
    9i                    l   S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSKrSSK	J
r
  SSK	Jr  SSKJr  SSKJr  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr  \R.                  " \5      rSrSrSr\R:                  " S5      r\R:                  " 5       r " S S\
R@                  5      r!S r"S r# SS jr$\"r%g)z.
This module provides a client class for BCC.
    )unicode_literalsN)bce_base_client)compat)bce_v1_signer)bce_http_client)handler)http_methods)	bcc_model)aes128_encrypt_16char_key)requireds   syncs   asyncAES256Postpaidc                   <   \ rS rSrSrSrSrSS jrSS jr  SS jr	  SS	 jr
\" \\\\4S
9             SS j5       r\" \\\\4\\4S9    SS j5       r\" \\\\4\\4S9    SS j5       r\" \\\\4S
9               SS j5       r     SS jr\" \\4S9SS j5       r\" \\4S9SS j5       r\" \\4S9SS j5       r\" \\4S9SS j5       r\" \S9  SS j5       r\" \\S9SS j5       r\" \\4\\4S9SS j5       r\" \\4\\4S9  SS j5       r\" \\4\\4S9SS j5       r\" \\4\\4S9  SS  j5       r\" \\4S9SS! j5       r\" \\4\\S"9   SS# j5       r \" \\4\\4S$9SS% j5       r!\" \\4\\4S$9SS& j5       r"\" \\S'9SS( j5       r#\" \\S'9SS) j5       r$SS* jr%SS+ jr&\" \\4\S,9SS- j5       r'\" \\4\S,9SS. j5       r(\" \\4S9SS/ j5       r)\" \\4S9     SS0 j5       r*SS1 jr+\" \S29       SS3 j5       r,\" \\4S49       SS5 j5       r-    SS6 jr.\" \\4S79SS8 j5       r/\" \\4\\4S99SS: j5       r0\" \\4\\4S99SS; j5       r1SS< jr2\" \\4S79SS= j5       r3\" \\4\S>9 SS? j5       r4\" \\4\\4S@9SSA j5       r5\" \\4S79    SSB j5       r6\" \\4\\4\\4SC9 SSD j5       r7\" \\4S79  SSE j5       r8\" \\4\\4SF9     SSG j5       r9\" \\4\\4SH9    SSI j5       r:  SSJ jr;\" \\4SK9SSL j5       r<\" \\4SK9SSM j5       r=\" \\4\\4\SN9 SSO j5       r>\" \\4SK9 SSP j5       r?\" \\4SK9    SSQ j5       r@\" \\4SK9    SSR j5       rA\" \\4SK9 SSS j5       rB\" \ST9  SSU j5       rC\" \\4\\4SV9    SSW j5       rDSSX jrE\" \\4S49SSY j5       rF\" \\4S49SSZ j5       rG\" \\4\S[9     SS\ j5       rH  SS] jrI\" \\4S^9SS_ j5       rJ\" \\4\KR                  S`9  SSa j5       rM\" \\4\KR                  S`9SSb j5       rN         SSc jrO\" \\4Sd9SSe j5       rP\" \\4S^9SSf j5       rQSSg jrR\" \\4\\\\4Sh9      SSi j5       rS\" \\4\Sj9   SSk j5       rT\" \\4\Sj9   SSl j5       rU\" \\4Sm9  SSn j5       rVSSo jrW\" \\4Sm9SSp j5       rX\" \\4Sq9   SSr j5       rY\" \\4\\4Ss9    SSt j5       rZSSu jr[\" \\4Sv9SSw j5       r\\" \\4\Sx9   SSy j5       r]\" \\4\Sz9   SS{ j5       r^\" \\4Sv9  SS| j5       r_\" \\4\\4S}9   SS~ j5       r`\" \\4\\4S9   SS j5       ra\" \S9    GS S j5       rb  SS jrc\" \\4S9SS j5       rd\" \\4\S9SS j5       re\" \\4S9  GSS j5       rf\" \\4S9  GSS j5       rg\" \\4S9SS j5       rh  GSS jri\" \\\4S9               GSS j5       rj\" \\4S9SS j5       rk\" \\4S9   SS j5       rl\" \\4S9   SS j5       rm\" \\4S9SS j5       rn\" \\4S9SS j5       ro\" \\4\S9  SS j5       rp\" \S9SS j5       rq\" \ST9   SS j5       rr\" \\\S9     GSS j5       rsSS jrt\" \\4\S9SS j5       ru\" \\4\vS9SS j5       rw\" \\4S79  SS j5       rx\" \\\S9SS j5       ry\" \S79SS j5       rz\" \S9SS j5       r{\" \S79SS j5       r|\" \S79SS j5       r}\" \S79  SS j5       r~\" \S9SS j5       r\" \S9SS j5       r  SS jr  GSS jr  SS jr    SS jr   SS jr\" \S9SS j5       rSS jrSS jr  SS jr  SS jr  SS jrSS jr  GSS jr  SS jrSS jrSS jrSS jr   SS jrSS jr  SS jrSS jr  SS jr  SS jrSS jrSS jrSS jrSS jrSS jrGSS jrGSS jrSS jrSS jr  SS jrSS jrSS jrSS jrSS jrSS jrSS jr  SS jrSS jrSS jrSS jrSS jrSS jrSS jr      GSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jr  SS jr SS jr  SS jrSS jrSS jr   GSS jr    SS jr   GSS jr    SS jr  SS jrGS	S jr  GS
S jrSrg(  	BccClient0   z
Bcc base sdk client
s   /v2s   /v3Nc                 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/bcc/bcc_client.pyr   BccClient.__init__8   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BccClient._merge_config;   s7    >;;4;;/J,,V4r   c	           
          U R                  U5      nUc  [        R                  nUc  [        R                  n[
        R                  " U[        R                  [        R                  U/XU-   X4U5      $ r   )
r   r   
parse_jsonr   prefixr   send_requestr   signparse_error)	r   http_methodpathbodyheadersparamsr   body_parserr#   s	            r   _send_requestBccClient._send_requestC   sk     ##F+!,,K>%%F++M&&)<)<k(J$v? 	?r   c           
          U R                  U5      nUc  [        R                  n[        R                  " U[
        R                  [        R                  U/XX4U5      $ r   )r   r   r"   r   r$   r   r%   r&   )r   r'   r(   r)   r*   r+   r   r,   s           r   _send_action_requestBccClient._send_action_requestP   sW     ##F+!,,K++M&&)<)<k(Jtf6 	6r   )	cpu_countmemory_capacity_in_gbimage_idc8                    Sn80 n9U3c  [        5       U9S'   OU3U9S'   Uc  [        nU5S:X  a  US:  a  Un5U6c  U-n6UUUUR                  S.n:U!b  U!U:S'   U"b  U"U:S'   U#b  U#U:S'   U$b  U$U:S'   U%b  U%U:S	'   U&b  U&U:S
'   U'b  U'U:S'   U.b!  U. V;s/ s H  n;U;R                  PM     n<n;U<U:S'   U/b  U/U:S'   U0b  U0U:S'   U1b  U1U:S'   Ub  UU:S'   US:w  a  UU:S'   Ub  UU:S'   Ub   U V=s/ s H  n=U=R                  PM     sn=U:S'   US:w  a  UU:S'   US:  a  UU:S'   Ub  UU:S'   Ub1  U R                  R                  R
                  n>[        UU>5      n?U?U:S'   Ub  UU:S'   Ub  UU:S'   Ub  UU:S'   U(b  U(U:S'   U)b  U)U:S'   U*b  U*U:S'   U+b  U+U:S'   Ub  UU:S '   U5S:  a  U5OSU:S!'   U b  U U:S"'   U5S:  a  U5OSU:S!'   U,b  U,U:S#'   U5S:  a  U5OSU:S!'   U6b  U6U:S$'   U5S:  a  U5OSU:S!'   U7b  U7U:S%'   US:w  a  UU:S&'   Uc  S'U:S('   OUU:S('   U	b   U	 V@s/ s H  n@U@R                  PM     sn@U:S)'   U
b  U
U:S*'   Ub  UU:S+'   Ub  UU:S,'   Ub  UU:S-'   Ub  UU:S.'   Ub  UU:S/'   Ub  UU:S0'   Ub  UU:S1'   Ub!  U VAs/ s H  nAUAR                  PM     nBnAUBU:S2'   Ub  UU:S3'   U2b  U2U:S4'   UU:S5'   U R                  [        R                  U8[        R                  " U:5      U9U4S69$ s  sn;f s  sn=f s  sn@f s  snAf )7a!  
Create a bcc Instance with the specified options.
You must fill the field of clientToken,which is especially for keeping idempotent.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param instance_type:
    The specified Specification to create the instance,
    See more detail on
    https://cloud.baidu.com/doc/BCC/API.html#InstanceType
:type instance_type: string

:param cpu_count:
    The parameter to specified the cpu core to create the instance.
:type cpu_count: int

:param memory_capacity_in_gb:
    The parameter to specified the capacity of memory in GB to create the instance.
:type memory_capacity_in_gb: int

:param image_id:
    The id of image, list all available image in BccClient.list_images.
:type image_id: string

:param billing:
    Billing information.
:type billing: bcc_model.Billing

:param create_cds_list:
    The optional list of volume detail info to create.
:type create_cds_list: list<bcc_model.CreateCdsModel>

:param network_capacity_in_mbps:
    The optional parameter to specify the bandwidth in Mbps for the new instance.
    It must among 0 and 200, default value is 0.
    If it's specified to 0, it will get the internal ip address only.
:type network_capacity_in_mbps: int

:param purchase_count:
    The number of instance to buy, the default value is 1.
:type purchase_count: int

:param name:
    The optional parameter to desc the instance that will be created.
:type name: string

:param admin_pass:
    The optional parameter to specify the password for the instance.
    If specify the adminPass,the adminPass must be a 8-16 characters String
    which must contains letters, numbers and symbols.
    The symbols only contains "!@#$%^*()".
    The adminPass will be encrypted in AES-128 algorithm
    with the substring of the former 16 characters of user SecretKey.
    If not specify the adminPass, it will be specified by an random string.
    See more detail on
    https://bce.baidu.com/doc/BCC/API.html#.7A.E6.31.D8.94.C1.A1.C2.1A.8D.92.ED.7F.60.7D.AF
:type admin_pass: string

:param zone_name:
    The optional parameter to specify the available zone for the instance.
    See more detail through list_zones method
:type zone_name: string

:param subnet_id:
    The optional parameter to specify the id of subnet from vpc, optional param
     default value is default subnet from default vpc
:type subnet_id: string

:param security_group_id:
    The optional parameter to specify the securityGroupId of the instance
    vpcId of the securityGroupId must be the same as the vpcId of subnetId
    See more detail through listSecurityGroups method
:type security_group_id: string

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:param fpgaCard:
    This parameter is obsolete. Use parameter isomerism_card instead.
:type fpgaCard: string

:param gpuCard:
    This parameter is obsolete. Use parameter isomerism_card instead.
:type gpuCard: string

:param cardCount:
    This parameter is obsolete. Use parameter card_count instead.
:type cardCount: int

:param card_count:
    The parameter to specify the card count for creating GPU/FPGA instance.
:type card_count: int

:param root_disk_size_in_gb:
    The parameter to specify the root disk size in GB.
    The root disk excludes the system disk, available is 40-500GB.
:type root_disk_size_in_gb: int

:param root_disk_storage_type:
    The parameter to specify the root disk storage type.
    Default use of HP1 cloud disk.
:type root_disk_storage_type: string

:param ephemeral_disks:
    The optional list of ephemeral volume detail info to create.
:type ephemeral_disks: list<bcc_model.EphemeralDisk>

:param dedicate_host_id:
    The parameter to specify the dedicate host id.
:type dedicate_host_id: string

:param auto_renew_time_unit:
    The parameter to specify the unit of the auto renew time.
    The auto renew time unit can be "month" or "year".
    The default value is "month".
:type auto_renew_time_unit: string

:param auto_renew_time:
    The parameter to specify the auto renew time, the default value is 0.
:type auto_renew_time: int

:param tags:
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:param deploy_id:
    The parameter to specify the id of the deploymentSet.
:type deploy_id: string

:param bid_model:
    The parameter to specify the bidding model.
    The bidding model can be "market" or "custom".
:type bid_model: string

:param bid_price:
    The parameter to specify the bidding price.
    When the bid_model is "custom", it works.
:type bid_price: string

:param key_pair_id:
    The parameter to specify id of the keypair.
:type key_pair_id: string

:param asp_id:
    The parameter to specify id of the asp.
:type asp_id: string

:param request_token:
    The parameter to specify the request token which will make the request idempotent.
:type request_token: string

:param internet_charge_type:
    The parameter to specify the internet charge type.
    See more detail on
    https://cloud.baidu.com/doc/BCC/API.html#InternetChargeType
:type internet_charge_type: string

:param internal_ips:
    The parameter to specify the internal ips.
:type internal_ips: list<string>

:param cds_auto_renew
    The parameter to specify whether the cds is auto renew or not.
    The default value is false.
:type cds_auto_renew: boolean

:param spec:
    spec
:type spec: string

:param eip_name:
    eip name
:type eip_name: string

:param hostname:
    The optional parameter to specify the host name of the instance virtual machine.
    By default, hostname is not specified.
    If hostname is specified: hostname is used as the prefix of the name in batches.
    The backend will add a suffix, and the suffix generation method is: name{-serial number}.
    If name is not specified, it will be automatically generated using the following method:
    {instance-eight-digit random string-serial number}.
    Note: The random string is generated from the characters 0-9 and a-z;
    the serial number increases sequentially according to the magnitude of count.
    If count is 100, the serial number increases from 000~100, and if it is 10, it increases from 00~10.
    Only lowercase letters, numbers and - . special characters are supported.
    They must start with a letter. Special symbols cannot be used continuously.
    Special symbols are not supported at the beginning or end. The length is 2-64.
:type hostname: string

:param auto_seq_suffix:
    The parameter to specify whether name and hostname order suffixes are automatically generated
:type auto_seq_suffix: boolean

:param is_open_hostname_domain:
    The parameter to specify whether hostname domain is automatically generated
:type is_open_hostname_domain: boolean

:param relation_tag:
    The parameter to specify whether the instance related to existing tags
:type relation_tag: boolean

:param is_open_ipv6:
    is_open_ipv6
:type is_open_ipv6: boolean

:param enterprise_security_group_id:
    enterprise_security_group_id
:type enterprise_security_group_id: string

:param security_group_ids:
    security_group_ids
:type security_group_ids: list<string>

:param enterprise_security_group_ids:
    enterprise_security_group_ids
:type enterprise_security_group_ids: list<string>

:param ehc_cluster_id:
    The id of ehcCluster.
:type ehc_cluster_id: string

:param kunlunCard:
    This parameter is obsolete. Use parameter isomerism_card instead.
:type kunlunCard: string

:param isomerismCard:
    type of isomerismCard, including kunlunCard, fpgaCard, gpuCard
:type isomerismCard: string

:param isomerism_card:
    type of isomerismCard, including kunlunCard, fpgaCard, gpuCard.
:type isomerism_card: string

:param file_systems:
    This parameter is obsolete.
:type file_systems:list<bcc_model.FileSystemModel>

:param user_data:
:type user_data: string

:param is_open_hosteye:
:type is_open_hosteye: boolean

:param deletion_protection:
:type deletion_protection: int

:param res_group_id:
    The optional parameter to specify the resGroupId of the instance
:type res_group_id: string

:return:
:rtype baidubce.bce_response.BceResponse
	   /instanceclientToken   cpuCountmemoryCapacityInGBimageIdbillingspeceipNamehostnameautoSeqSuffixisOpenHostnameDomainrelationTag
isOpenIpv6fileSystemsuserDataisOpenHosteyedeletionProtectioninstanceTyper   rootDiskSizeInGbrootDiskStorageTypecreateCdsListnetworkCapacityInMbpspurchaseCountname	adminPasszoneNamesubnetIdsecurityGroupIdenterpriseSecurityGroupIdsecurityGroupIdsenterpriseSecurityGroupIdsehcClusterIdgpuCard	cardCountfpgaCard
kunlunCardisomerismCardkeepImageLoginautoRenewTimemonthautoRenewTimeUnitephemeralDisksdedicatedHostIddeployIdbidModelbidPrice	keypairIdinternetChargeTypeaspIdrequestTokentagsinternalIps
resGroupIdcdsAutoRenewr+   r   generate_client_token#default_billing_to_purchase_created__dict__r   credentialssecret_access_keyr   r-   r	   POSTjsondumps)Cr   r2   r3   r4   instance_typer=   create_cds_listroot_disk_size_in_gbroot_disk_storage_typeephemeral_disksdedicate_host_idauto_renew_time_unitauto_renew_time	deploy_id	bid_model	bid_pricekey_pair_idcds_auto_renewinternet_charge_typeinternal_ipsrequest_tokenasp_idrj   network_capacity_in_mbpspurchase_countrY   rO   
admin_pass	zone_name	subnet_idsecurity_group_idrX   rZ   r>   eip_namer@   auto_seq_suffixis_open_hostname_domainrelation_tagis_open_ipv6enterprise_security_group_idsecurity_group_idsenterprise_security_group_idsehc_cluster_idr[   r\   file_systems	user_datais_open_hosteyedeletion_protectionres_group_idclient_tokenr   
card_countisomerism_cardis_keep_image_loginr(   r+   r)   file_systemfile_system_list
create_cdsrt   cipher_admin_passephemeral_disktagtag_listsC                                                                      r   create_instanceBccClient.create_instance[   s{   f $9$;F=!$0F=!?9G?y1}"J!*N!"7''	
 DL&DO'D&$3D!".+BD'(#".D#!-D#HTU 4 4U"2D (D&$3D!*)<D%&$#0D 1$';D#$!-*@D&'&KZ$[?ZZ%8%8?$[D!#q(,DD()A$2D!DL! $ 7 7 I I 9*FW X 1D (D (D(&7D"#'30LD,-)'9D#$(41ND-.%#1D %DO.81n
!D'D.81n
!D!!+D.81n
!D%$2D!.81n
!D*%8D!"a$3D!'(/D$%(<D$%&Tc%dTc.n&=&=Tc%dD!"'&6D"# (D (D (D" +D+)=D%&"DM$#0D 045H5#DL#".D#!-D-^!!,"3"3T4::d;K)/ " @ 	@o  V %\\ &e$ 6s   K
K K#K)r2   r3   dedicated_host_idr4   c                 `   Sn0 nUc  [        5       US'   OXS'   UUUUS.nUb  X_S'   US:  a  XoS'   Ub  XS'   U	b  XS'   U
b  XS	'   Ub1  U R                  R                  R                  n[	        UU5      nUUS
'   U R                  [        R                  U[        R                  " U5      UUS9$ )b
  
Create a Instance from dedicatedHost with the specified options.
You must fill the field of clientToken,which is especially for keeping idempotent.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param cpu_count:
    The specified number of cpu core to create the instance,
    is less than or equal to the remain of dedicated host.
:type cpu_count: int

:param memory_capacity_in_gb:
    The capacity of memory to create the instance,
    is less than or equal to the remain of dedicated host.
:type memory_capacity_in_gb: int

:param image_id:
    The id of image, list all available image in BccClient.list_images.
:type image_id: string

:param dedicated_host_id:
    The id of dedicated host, we can locate the instance in specified dedicated host.
:type dedicated_host_id: string

:param ephemeral_disks:
    The optional list of ephemeral volume detail info to create.
:type ephemeral_disks: list<bcc_model.EphemeralDisk>

:param purchase_count:
    The number of instance to buy, the default value is 1.
:type purchase_count: int

:param name:
    The optional parameter to desc the instance that will be created.
:type name: string

:param admin_pass:
    The optional parameter to specify the password for the instance.
    If specify the adminPass,the adminPass must be a 8-16 characters String
    which must contains letters, numbers and symbols.
    The symbols only contains "!@#$%^*()".
    The adminPass will be encrypted in AES-128 algorithm
    with the substring of the former 16 characters of user SecretKey.
    If not specify the adminPass, it will be specified by an random string.
    See more detail on
    https://bce.baidu.com/doc/BCC/API.html#.7A.E6.31.D8.94.C1.A1.C2.1A.8D.92.ED.7F.60.7D.AF
:type admin_pass: string

:param subnet_id:
    The optional parameter to specify the id of subnet from vpc, optional param
     default value is default subnet from default vpc
:type subnet_id: string

:param security_group_id:
    The optional parameter to specify the securityGroupId of the instance
    vpcId of the securityGroupId must be the same as the vpcId of subnetId
    See more detail through listSecurityGroups method
:type security_group_id: string

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
r6   r7   r:   r;   r<   rb   ra   r   rN   rO   rR   rS   rP   rn   )
rp   r   rs   rt   r   r-   r	   ru   rv   rw   )r   r2   r3   r4   r   r|   r   rO   r   r   r   r   r   r(   r+   r)   rt   r   s                     r   ;create_instance_from_dedicated_host_with_encrypted_passwordEBccClient.create_instance_from_dedicated_host_with_encrypted_password  s    \ $9$;F=!$0=!!"70	
 &%4!"A$2!L ((&7"#! $ 7 7 I I 9*FW X 1D!!,"3"3T4::d;KTZ)/ " 1 	1r   c                    Sn0 nUc  [        5       US'   OXS'   UUUUS.nUb  X_S'   US:  a  XoS'   Ub  XS'   Ub  XS'   U	b  XS	'   U
b  XS
'   U R                  [        R                  U[        R
                  " U5      UUS9$ )r   r6   r7   r   ra   r   rN   rO   rP   rR   rS   rn   rp   r-   r	   ru   rv   rw   )r   r2   r3   r4   r   r|   r   rO   r   r   r   r   r   r(   r+   r)   s                   r   #create_instance_from_dedicated_host-BccClient.create_instance_from_dedicated_hostT  s    \ $9$;F=!$0=!!"70	
 &%4!"A$2!L! * ((&7"#!!,"3"3T4::d;KTZ)/ " 1 	1r   c7                 r   Sn70 n8U!c  [        5       U8S'   OU!U8S'   Uc  [        nU3S:X  a  US:  a  Un3U4c  U1n4UUUUR                  S.n9U&b  U&U9S'   U'b  U'U9S'   U(b  U(U9S'   U)b  U)U9S'   U*b  U*U9S	'   U+b  U+U9S
'   U,b  U,U9S'   U%b  U%U9S'   U-b  U-U9S'   U4b  U4U9S'   U2b!  U2 V:s/ s H  n:U:R                  PM     n;n:U;U9S'   Ub  UU9S'   US:w  a  UU9S'   Ub  UU9S'   Ub   U V<s/ s H  n<U<R                  PM     sn<U9S'   US:w  a  UU9S'   US:  a  UU9S'   Ub  UU9S'   Ub1  U R                  R                  R
                  n=[        UU=5      n>U>U9S'   Ub  UU9S'   Ub  UU9S'   Ub  UU9S'   U.b  U.U9S'   U0b  U0U9S'   Ub  UU9S'   U3S:  a  U3OSU9S'   U b  U U9S '   U3S:  a  U3OSU9S'   US:w  a  UU9S!'   Uc  S"U9S#'   OUU9S#'   U	b   U	 V?s/ s H  n?U?R                  PM     sn?U9S$'   U
b  U
U9S%'   Ub  UU9S&'   Ub  UU9S''   Ub  UU9S('   Ub  UU9S)'   Ub  UU9S*'   Ub  UU9S+'   Ub  UU9S,'   Ub!  U V@s/ s H  n@U@R                  PM     nAn@UAU9S-'   Ub  UU9S.'   UU9S/'   U#b  U#U9S0'   U$b  U$U9S1'   U/b  U/U9S2'   U6b  U6U9S3'   U5U9S4'   U R                  [        R                  U7[        R                  " U95      U8U"S59$ s  sn:f s  sn<f s  sn?f s  sn@f )6a!  
Create a bcc Instance with the specified options.
You must fill the field of clientToken,which is especially for keeping idempotent.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param instance_type:
    The specified Specification to create the instance,
    See more detail on
    https://cloud.baidu.com/doc/BCC/API.html#InstanceType
:type instance_type: string

:param cpu_count:
    The parameter to specified the cpu core to create the instance.
:type cpu_count: int

:param memory_capacity_in_gb:
    The parameter to specified the capacity of memory in GB to create the instance.
:type memory_capacity_in_gb: int

:param image_id:
    The id of image, list all available image in BccClient.list_images.
:type image_id: string

:param billing:
    Billing information.
:type billing: bcc_model.Billing

:param create_cds_list:
    The optional list of volume detail info to create.
:type create_cds_list: list<bcc_model.CreateCdsModel>

:param network_capacity_in_mbps:
    The optional parameter to specify the bandwidth in Mbps for the new instance.
    It must among 0 and 200, default value is 0.
    If it's specified to 0, it will get the internal ip address only.
:type network_capacity_in_mbps: int

:param purchase_count:
    The number of instance to buy, the default value is 1.
:type purchase_count: int

:param name:
    The optional parameter to desc the instance that will be created.
:type name: string

:param admin_pass:
    The optional parameter to specify the password for the instance.
    If specify the adminPass,the adminPass must be a 8-16 characters String
    which must contains letters, numbers and symbols.
    The symbols only contains "!@#$%^*()".
    The adminPass will be encrypted in AES-128 algorithm
    with the substring of the former 16 characters of user SecretKey.
    If not specify the adminPass, it will be specified by an random string.
    See more detail on
    https://bce.baidu.com/doc/BCC/API.html#.7A.E6.31.D8.94.C1.A1.C2.1A.8D.92.ED.7F.60.7D.AF
:type admin_pass: string

:param zone_name:
    The optional parameter to specify the available zone for the instance.
    See more detail through list_zones method
:type zone_name: string

:param subnet_id:
    The optional parameter to specify the id of subnet from vpc, optional param
     default value is default subnet from default vpc
:type subnet_id: string

:param security_group_id:
    The optional parameter to specify the securityGroupId of the instance
    vpcId of the securityGroupId must be the same as the vpcId of subnetId
    See more detail through listSecurityGroups method
:type security_group_id: string

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:param fpgaCard:
    This parameter is obsolete. Use parameter isomerism_card instead.
:type fpgaCard: string

:param gpuCard:
    This parameter is obsolete. Use parameter isomerism_card instead.
:type gpuCard: string

:param cardCount:
    This parameter is obsolete. Use parameter card_count instead.
:type cardCount: int

:param card_count:
    The parameter to specify the card count for creating GPU/FPGA instance.
:type card_count: int

:param root_disk_size_in_gb:
    The parameter to specify the root disk size in GB.
    The root disk excludes the system disk, available is 40-500GB.
:type root_disk_size_in_gb: int

:param root_disk_storage_type:
    The parameter to specify the root disk storage type.
    Default use of HP1 cloud disk.
:type root_disk_storage_type: string

:param ephemeral_disks:
    The optional list of ephemeral volume detail info to create.
:type ephemeral_disks: list<bcc_model.EphemeralDisk>

:param dedicate_host_id:
    This parameter is obsolete.
:type dedicate_host_id: string

:param auto_renew_time_unit:
    This parameter is obsolete.
:type auto_renew_time_unit: string

:param auto_renew_time:
    This parameter is obsolete.
:type auto_renew_time: string

:param tags:
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:param deploy_id:
    This parameter is obsolete.
:type deploy_id: string

:param bid_model:
    The parameter to specify the bidding model.
    The bidding model can be "market" or "custom".
:type bid_model: string

:param bid_price:
    The parameter to specify the bidding price.
    When the bid_model is "custom", it works.
:type bid_price: string

:param key_pair_id:
    The parameter to specify id of the keypair.
:type key_pair_id: string

:param asp_id:
    The parameter to specify id of the asp.
:type asp_id: string

:param request_token:
    The parameter to specify the request token which will make the request idempotent.
:type request_token: string

:param internet_charge_type:
    The parameter to specify the internet charge type.
    See more detail on
    https://cloud.baidu.com/doc/BCC/API.html#InternetChargeType
:type internet_charge_type: string

:param internal_ips:
    This parameter is obsolete.
:type internal_ips: list<string>

:param cds_auto_renew:
    This parameter is obsolete.
:type cds_auto_renew: boolean

:param spec:
    The parameter to specify Specification to create the instance.
:type spec: string

:param user_data:
    The parameter to specify instance custom data.
:type user_data string

:param hostname:
    The optional parameter to specify the host name of the instance virtual machine.
    By default, hostname is not specified.
    If hostname is specified: hostname is used as the prefix of the name in batches.
    The backend will add a suffix, and the suffix generation method is: name{-serial number}.
    If name is not specified, it will be automatically generated using the following method:
    {instance-eight-digit random string-serial number}.
    Note: The random string is generated from the characters 0-9 and a-z;
    the serial number increases sequentially according to the magnitude of count.
    If count is 100, the serial number increases from 000~100, and if it is 10, it increases from 00~10.
    Only lowercase letters, numbers and - . special characters are supported.
    They must start with a letter. Special symbols cannot be used continuously.
    Special symbols are not supported at the beginning or end. The length is 2-64.
:type hostname: string

:param auto_seq_suffix:
    The parameter to specify whether name and hostname order suffixes are automatically generated.
:type auto_seq_suffix: boolean

:param is_open_hostname_domain:
    The parameter to specify whether hostname domain is automatically generated
:type is_open_hostname_domain: boolean

:param spec_id:
    Identify of the spec.
:type spec_id: string

:param relation_tag:
    The parameter to specify whether the instance related to existing tags
:type relation_tag: boolean

:param is_open_ipv6:
    The parameter indicates whether the instance to be created is enabled for IPv6.
    It can only be enabled when both the image and subnet support IPv6.
    True indicates enabled, false indicates disabled,
    and no transmission indicates automatic adaptation of the image and subnet's IPv6 support
:type is_open_ipv6: boolean

:param deletion_protection:
    The status of instance deletion protection. 1:enable, 0:disable.
:type deletion_protection: int

:param eip_name:
    eip name
:type eip_name: string

:param isomerismCard:
    This parameter is obsolete. Use parameter isomerism_card instead.
:type isomerismCard: string

:param isomerism_card:
    The parameter to specify the card type for creating GPU/FPGA instance.
:type isomerism_card: string

:param enterprise_security_group_id:
:type enterprise_security_group_id: string

:param security_group_ids:
    security_group_ids
:type security_group_ids: list<string>

:param res_group_id:
    The optional parameter to specify the resGroupId of the instance
:type res_group_id: string

:param enterprise_security_group_ids:
    enterprise_security_group_ids
:type enterprise_security_group_ids: list<string>

:param file_systems:
    This parameter is obsolete.
:type file_systems: list<bcc_model.FileSystemModel>

:param is_eip_auto_related_delete:
    The parameter to specify whether to delete the relevant EIP after the bidding instance is automatically deleted.
:type is_eip_auto_related_delete: boolean

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/bidr7   r8   r9   r@   rA   rB   specIdrC   rD   rH   r?   rT   r\   rE   rI   r   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rU   rV   rX   rY   rZ   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rm   r>   rF   rl   r]   isEipAutoRelatedDeletern   ro   )Br   r2   r3   r4   rx   r=   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   rj   r   r   rY   rO   r   r   r   r   rX   rZ   r   r   r>   r   r   r@   r   r   spec_idr   r   r   r   r   r   r   r\   r   r   r   is_eip_auto_related_deleter   r(   r+   r)   r   r   r   rt   r   r   r   r   sB                                                                     r   create_instance_of_bid BccClient.create_instance_of_bid  sA   f  $9$;F=!$0F=!?9G?y1}"J!*N!"7''	
 'D&$3D!".+BD'($DN#".D#!-D*)<D%&&DO'30LD,-%$2D!#HTU 4 4U"2D$#0D 1$';D#$!-*@D&'&KZ$[?ZZ%8%8?$[D!#q(,DD()A$2D!DL! $ 7 7 I I 9*FW X 1D (D (D(&7D"#)'9D#$(41ND-.%DO.81n
!D'D.81n
!Da$3D!'(/D$%(<D$%&Tc%dTc.n&=&=Tc%dD!"'&6D"# (D (D (D" +D+)=D%&"DM$#0D 045H5#DL#".D-^DL (D#!-D*%8D!")C%&!!,"3"3T4::d;K)/ " @ 	@Y  V %\D &e$ 6s   J%J*>J/!J4c                 z   Sn0 nUb  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS	'   U	b  U	US
'   U
b  U
US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   U R                  [        R                  UUUS9$ )a	  
Return a list of instances owned by the authenticated user.

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

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

:param internal_ip:
    The identified internal ip of instance.
:type internal_ip: string

:param dedicated_host_id:
    get instance list filtered by id of dedicated host
:type dedicated_host_id: string

:param zone_name:
    get instance list filtered by name of available zone
:type zone_name: string

:param instance_ids:
    filter instance list with multiple instance ids join by ','
:type instance_ids: string

:param instance_names:
    filter instance list with multiple instance names join by ','
:type instance_names: string

:param cds_ids:
    filter instance list with multiple cds ids join by ','
:type cds_ids: string

:param ehc_cluster_id:
    get instance list filtered by id of ehc cluster
:type ehc_cluster_id: string

:param deployset_ids:
    filter instance list with multiple deployset ids join by ','
:type deployset_ids: string

:param security_group_ids:
    filter instance list with multiple securityGroup ids join by ','
:type security_group_ids: string

:param payment_timing:
    filter instance list with multiple type of paymentTiming join by ','
:type payment_timing: string

:param status:
    filter instance list with multiple instance status join by ','
:type status: string

:param tags:
    filter instance list with multiple tags join by ',', the format of tag can be :
    tagKey:tagValue or tagKey
:type tags: string

:param vpc_id:
    filter instance list with vpc id, the parameter should be used with private_ips
:type vpc_id: string

:param private_ips:
    filter instance list with multiple private ips join by ',', the parameter should be used with
    vpc_id
:type private_ips: string

:param ipv6_addresses:
    filter instance list with multiple ipv6 private ips join by ',', the parameter should be used with
    vpc_id
:type ipv6_addresses: string

:param auto_renew:
:type auto_renew: boolean

:param fuzzy_instance_name:
    filter instance list with fuzzy instance name
:type fuzzy_instance_name: string

:return:
:rtype baidubce.bce_response.BceResponse
r6   markermaxKeys
internalIprb   rQ   instanceIdsinstanceNamescdsIdsrW   deploySetIdsrU   paymentTimingstatusrj   vpcId
privateIpsipv6Addresses	autoRenewfuzzyInstanceNamern   r-   r	   GET)r   r   max_keysinternal_ipr   r   instance_idsinstance_namescds_idsr   deployset_idsr   payment_timingr   rj   vpc_idprivate_ipsipv6_addresses
auto_renewfuzzy_instance_namer   r(   r+   s                          r   list_instancesBccClient.list_instancesF  sa   z %F8 (F9"#.F< ((9F$% !*F:#$0F=!%&4F?#&F8%%3F>"$%2F>"));F%&%&4F?#%F8!F6N$F7O"#.F< %&4F?#!",F;**=F&'!!,"2"2DPV!WWr   )instance_idc                     UR                  SS9nSU-  n0 nU(       a  X%S'   U R                  [        R                  XEUS9$ )E  
Get the detail information of specified instance.

:param instance_id:
    The id of instance.
:type instance_id: string

:param contains_failed:
    The optional parameters to get the failed message.If true, it means get the failed message.
:type contains_failed: boolean

:return:
:rtype baidubce.bce_response.BceResponse
utf-8encoding   /instance/%scontainsFailedrn   encoder-   r	   r   r   r   contains_failedr   r(   r+   s         r   get_instanceBccClient.get_instance  sQ      "(('(:,'6#$!!,"2"2DPV!WWr   c                 ~    [         R                  " U5      nSU-  nSS0nU R                  [        R                  X4US9$ )ao  
Starting the instance owned by the user.
You can start the instance only when the instance is Stopped,
otherwise, it's will get 409 errorCode.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param instance_id: id of instance proposed to start
:type instance_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r   startNrn   )r   convert_to_bytesr-   r	   PUT)r   r   r   r(   r+   s        r   start_instanceBccClient.start_instance  sK     --k:,T
 !!,"2"2DPV!WWr   c                     [         R                  " U5      nSU-  nUUS.nSS0nU R                  [        R                  U[
        R                  " U5      XtS9$ )ag  
Stopping the instance owned by the user.
You can stop the instance only when the instance is Running,
otherwise, it's will get 409 errorCode.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param instance_id:
    The id of instance.
:type instance_id: string

:param force_stop:
    The optional parameter to stop the instance forcibly.If true,
    it will stop the instance just like power off immediately
    and it may result in losing important data which have not been written to disk.
:type force_stop: boolean

:return:
:rtype baidubce.bce_response.BceResponse
r   )	forceStopstopWithNoChargestopNrn   r   r   r-   r	   r   rv   rw   )r   r   
force_stopr   r   r(   r)   r+   s           r   stop_instanceBccClient.stop_instance  sm    , --k:,# 0

 D
 !!,"2"2D$**T:J)/ " @ 	@r   c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )aj  
Rebooting the instance owned by the user.
You can reboot the instance only when the instance is Running,
otherwise, it's will get 409 errorCode.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param instance_id:
    The id of instance.
:type instance_id: string

:param force_stop:
    The optional parameter to stop the instance forcibly.If true,
    it will stop the instance just like power off immediately
    and it may result in losing important data which have not been written to disk.
:type force_stop: boolean

:return:
:rtype baidubce.bce_response.BceResponse
r   r   rebootNrn   r   )r   r   r   r   r(   r)   r+   s          r   reboot_instanceBccClient.reboot_instance  sl    , --k:,
 d
 !!,"2"2D$**T:J)/ " @ 	@r   c                     SnSU0nUb  X'S'   Ub  X7S'   Ub  XGS'   0 nU R                  [        R                  U[        R                  " U5      XS9$ )av  
batch_add_ip

:param instance_id:
    The id of instance.
:type instance_id: string

:param private_ips:
    The IPV6/IPV4 address that needs to be added must exist with secondary_private_ip_address_count.
:type private_ips: list

:param secondary_private_ip_address_count:
    The number of IPV6/IPV4 needs to be increased, and one with private_ips must exist.
:type secondary_private_ip_address_count: list

:param allocate_multi_ipv6_addr:
    The parameter indicates whether to support multiple IPV6.
    It must be true to create IPV6.
:type allocate_multi_ipv6_addr: bool

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/batchAddIp
instanceIdr   secondaryPrivateIpAddressCountallocateMultiIpv6Addrrn   r-   r	   r   rv   rw   )	r   r   r   "secondary_private_ip_address_countallocate_multi_ipv6_addrr   r(   r)   r+   s	            r   batch_add_ipBccClient.batch_add_ip@  s~    4 '+
 "!,-95W12#/,D()
 !!,"2"2D$**T:J)/ " @ 	@r   )r   r   c                 |    SnUUS.n0 nU R                  [        R                  U[        R                  " U5      XcS9$ )zA
:param instance_id:
:param private_ips:
:param config:
:return:
s   /instance/batchDelIp)r   r   rn   r   )r   r   r   r   r(   r)   r+   s          r   batch_delete_ipBccClient.batch_delete_ipj  sQ     '%%

 !!,"2"2D$**T:J)/ " @ 	@r   )r   r   c                    [         R                  " U5      nU R                  R                  R                  n[        X$5      nSU-  nSU0nSS0nU R                  [        R                  U[        R                  " U5      XS9$ )aG  
Modifying the password of the instance.
You can change the instance password only when the instance is Running or Stopped ,
otherwise, it's will get 409 errorCode.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param instance_id:
    The id of instance.
:type instance_id: string

:param admin_pass:
    The new password to update.
    The adminPass will be encrypted in AES-128 algorithm
    with the substring of the former 16 characters of user SecretKey.
:type admin_pass: string

:return:
:rtype baidubce.bce_response.BceResponse
r   rP   
changePassNrn   r   r   r   rs   rt   r   r-   r	   r   rv   rw   )	r   r   r   r   rt   r   r(   r)   r+   s	            r   modify_instance_password"BccClient.modify_instance_password}  s    . --k: KK33EE5jT,*
 $
 !!,"2"2D$**T:J)/ " @ 	@r   )r   rO   c                     [         R                  " U5      nSU-  nUUS.nUb  XGS'   SS0nU R                  [        R                  U[
        R                  " U5      XS9$ )a  
Modifying the special attribute to new value of the instance.
You can reboot the instance only when the instance is Running or Stopped ,
otherwise, it's will get 409 errorCode.

:param instance_id:
    The id of instance.
:type instance_id: string

:param name:
    The new value for instance's name.
:type name: string

:param neteth_queuecount:
    The new value for instance's neteth_queuecount.
:type neteth_queuecount: string

:param enable_jumbo_frame:
    The parameter indicates whether the instance is enabled for JumboFrame.
    It can only be enabled when the flavor support JumboFrame.
    True indicates enabled, false indicates disabled,
:type enable_jumbo_frame: bool


:return:
:rtype baidubce.bce_response.BceResponse
r   )rO   netEthQueueCountNenableJumboFramemodifyAttributern   r   )	r   r   rO   neteth_queuecountenable_jumbo_framer   r(   r)   r+   s	            r   modify_instance_attributes$BccClient.modify_instance_attributes  s|    > --k:, 1
 )'9#$t
 !!,"2"2D$**T:J)/ " @ 	@r   )r   descc                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )ah  
Modifying the description of the instance.
You can reboot the instance only when the instance is Running or Stopped ,
otherwise, it's will get 409 errorCode.

:param instance_id:
    The id of instance.
:type instance_id: string

:param desc:
    The new value for instance's description.
:type name: string

:return:
:rtype baidubce.bce_response.BceResponse
r   r  
modifyDescNrn   r   )r   r   r  r   r(   r)   r+   s          r   modify_instance_descBccClient.modify_instance_desc  sl    & --k:,D
 $
 !!,"2"2D$**T:J)/ " @ 	@r   )r   r4   c                 "   [         R                  " U5      nSU-  nSU0nUb  XGS'   Ub/  U R                  R                  R                  n[        X85      n	XS'   SS0n
U R                  [        R                  U[        R                  " U5      XS9$ )a  
Rebuilding the instance owned by the user.
After rebuilding the instance,
all of snapshots created from original instance system disk will be deleted,
all of customized images will be saved for using in the future.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param instance_id:
    The id of instance.
:type instance_id: string

:param image_id:
    The id of the image which is used to rebuild the instance.
:type image_id: string

:param admin_pass:
    The admin password to login the instance.
    The admin password will be encrypted in AES-128 algorithm
    with the substring of the former 16 characters of user SecretKey.
    See more detail on
    https://bce.baidu.com/doc/BCC/API.html#.7A.E6.31.D8.94.C1.A1.C2.1A.8D.92.ED.7F.60.7D.AF
:type admin_pass: string

:param key_pair_id:
    key_pair_id or admin_pass is required for rebuild instance.
:type key_pair_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r   r<   Nrf   rP   rebuildrn   r  )r   r   r4   r   r   r   r(   r)   rt   r   r+   s              r   rebuild_instanceBccClient.rebuild_instance  s    F --k:,x
 " +! $ 7 7 I I 9* X 1t
 !!,"2"2D$**T:J)/ " @ 	@r   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )a&  
Releasing the instance owned by the user.
Only the Postpaid instance or Prepaid which is expired can be released.
After releasing the instance,
all of the data will be deleted.
all of volumes attached will be auto detached, but the volume snapshots will be saved.
all of snapshots created from original instance system disk will be deleted,
all of customized images created from original instance system disk will be reserved.

:param instance_id:
    The id of instance.
:type instance_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r   r   r   r   r-   r	   DELETEr   r   r   r(   s       r   release_instanceBccClient.release_instance   s:    $ --k:,!!,"5"5t!KKr   )r   r2   r3   c
                    [         R                  " U5      nSU-  n
UUS.nUb  XKS'   Ub  X[S'   Ub  XkS'   Ub  X{S'   SnUc  S[        5       S.nOSUS.nU R                  [        R
                  U
[        R                  " U5      XS	9$ )
a  
Resizing the instance owned by the user.
The Prepaid instance can not be downgrade.
Only the Running/Stopped instance can be resized, otherwise, it's will get 409 errorCode.
After resizing the instance,it will be reboot once.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param instance_id:
    The id of instance.
:type instance_id: string

:param cpu_count:
    The parameter of specified the cpu core to resize the instance.
:type cpu_count: int

:param memory_capacity_in_gb:
    The parameter of specified the capacity of memory in GB to resize the instance.
:type memory_capacity_in_gb: int

:param enable_jumbo_frame:
    The parameter of specified the instance enable/disable jumbo frame.
    True means enable jumbo frame, false means disable jumbo frame.
    enable_jumbo_frame default None which means:
    When you change to the spec which doesn't support jumbo frame, the jumbo frame will be disabled.
    When the original instance don't support jumbo frame and you change to the spec which support jumbo frame,
    the jumbo frame will be disabled.
    When the original spec of the instance support jumbo frame , then you change to the spec which support jumbo
    frame, if the original instance enable jumbo frame, the jumbo frame will be enabled, if the original instance
    disable jumbo frame, the jumbo frame will be disabled.
:type enable_jumbo_frame: bool

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:param live_resize:
:type live_resize: boolean

:param gpu_card_count:
:type gpu_card_count: int

:param ephemeral_disk_in_gb:
:type ephemeral_disk_in_gb: int

:return:
:rtype baidubce.bce_response.BceResponse
r   )r:   r;   N
liveResizegpuCardCountephemeralDiskInGbr  resizer7   rn   r   r   rp   r-   r	   r   rv   rw   )r   r   r2   r3   live_resizegpu_card_countephemeral_disk_in_gbr  r   r   r(   r)   r+   s                r   resize_instanceBccClient.resize_instance6  s    x --k:,!"7
 "!,%#1 +(<$%)'9#$46F +F !!,"2"2D$**T:J)/ " @ 	@r   )r   r   c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )a
  
Binding the instance to specified securitygroup.

:param instance_id:
    The id of the instance.
:type instance_id: string

:param securitygroup_id:
    The id of the securitygroup.
:type securitygroup_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r   rS   bindNrn   r   r   r   r   r   r(   r)   r+   s          r   bind_instance_to_security_group)BccClient.bind_instance_to_security_group  sm    " --k:,0
 D
 !!,"2"2D$**T:J)/ " @ 	@r   c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )a  
Unbinding the instance from securitygroup.

:param instance_id:
    The id of the instance.
:type instance_id: string

:param securitygroup_id:
    The id of the securitygroup.
:type securitygroup_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r   rS   unbindNrn   r   r1  s          r   #unbind_instance_from_security_group-BccClient.unbind_instance_from_security_group  sm    " --k:,0
 d
 !!,"2"2D$**T:J)/ " @ 	@r   )reserved_instance_idsrj   c                     SnU Vs/ s H  oUR                   PM     nnUUS.nSS0nU R                  [        R                  U[        R
                  " U5      XS9$ s  snf )D
:param reserved_instance_ids:
:param tags:
:param config:
:return:
   /bcc/reserved/tag
changeTagsreservedInstanceIdsr0  Nrn   rr   r-   r	   r   rv   rw   	r   r8  rj   r   r(   r   r   r)   r+   s	            r   bind_reserved_instance_to_tags(BccClient.bind_reserved_instance_to_tags  ss     $,01DSLLD1"#8

 D
 !!,"2"2D$**T:J)/ " @ 	@ 2   Ac                     SnU Vs/ s H  oUR                   PM     nnUUS.nSS0nU R                  [        R                  U[        R
                  " U5      XS9$ s  snf )r:  r;  r<  r5  Nrn   r?  r@  s	            r   "unbind_reserved_instance_from_tags,BccClient.unbind_reserved_instance_from_tags  ss     $,01DSLLD1"#8

 d
 !!,"2"2D$**T:J)/ " @ 	@ 2rC  c           	          SnU Vs/ s H  owR                   PM     nnUUUUS.n	SS0n
U R                  [        R                  U[        R
                  " U	5      XU R                  S9$ s  snf )i
:param resource_type:
:param resource_ids:
:param tags:
:param is_relation_tag:
:param config:
:return:
   /bcc/tagresourceTyperesourceIdsrj   isRelationTagaction
AttachTagsr+   r   r#   rr   r-   r	   ru   rv   rw   	prefix_v3r   resource_typeresource_idsrj   is_relation_tagr   r(   r   r   r)   r+   s              r    bind_tags_batch_by_resource_type*BccClient.bind_tags_batch_by_resource_type       ,01DSLLD1)',	
 l
 !!,"3"3T4::d;K)/t~~ " W 	W 2   A(c           	          SnU Vs/ s H  owR                   PM     nnUUUUS.n	SS0n
U R                  [        R                  U[        R
                  " U	5      XU R                  S9$ s  snf )rH  rI  rJ  rN  
DetachTagsrP  rQ  rS  s              r   "unbind_tags_batch_by_resource_type,BccClient.unbind_tags_batch_by_resource_type  rY  rZ  )r   rj   c                     [         R                  " U5      nSU-  nU Vs/ s H  oUR                  PM     nnSU0nSS0nU R                  [        R
                  U[        R                  " U5      XS9$ s  snf ):
:param instance_id:
:param tags:
:param config:
:return:
   /instance/%s/tagr=  r0  Nrn   r   r   rr   r-   r	   r   rv   rw   	r   r   rj   r   r(   r   r   r)   r+   s	            r   bind_instance_to_tagsBccClient.bind_instance_to_tags  s     --k:"[0,01DSLLD1(
 D
 !!,"2"2D$**T:J)/ " @ 	@ 2   A3c                     [         R                  " U5      nSU-  nU Vs/ s H  oUR                  PM     nnSU0nSS0nU R                  [        R
                  U[        R                  " U5      XS9$ s  snf )r`  ra  r=  r5  Nrn   rb  rc  s	            r   unbind_instance_from_tags#BccClient.unbind_instance_from_tags3  s     --k:"[0,01DSLLD1(
 d
 !!,"2"2D$**T:J)/ " @ 	@ 2rf  c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )z
Getting the vnc url to access the instance.
The vnc url can be used once.

:param instance_id:
    The id of the instance.
:type instance_id: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/%s/vncr  r   r   r-   r	   r   r   s       r   get_instance_vncBccClient.get_instance_vncH  s:     --k:"[0!!,"2"2D!HHr   c                 X   [         R                  " U5      nSU-  nUc  [        n/ nUb  U V	s/ s H  oR                  PM     nn	UR                  US.n
SnUc  S[	        5       S.nOSUS.nUb  X;S'   U R                  [        R                  U[        R                  " U
5      XS9$ s  sn	f )a  
PurchaseReserved the instance with fixed duration.
You can not purchaseReserved the instance which is resizing.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.

:param instance_id:
    The id of the instance.
:type instance_id: string

:param billing:
    Billing information.
:type billing: bcc_model.Billing

:param related_renew_flag:
    Detailed information see: https://cloud.baidu.com/doc/BCC/s/6jwvyo0q2#relatedrenewflag
:type related_renew_flag: string

:param cds_custom_period:
    Custom renew period for CDS.
:type cds_custom_period: list

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
r   N)r=   cdsCustomPeriodpurchaseReservedr7   relatedRenewFlagrn   
r   r   $default_billing_to_purchase_reservedrr   rp   r-   r	   r   rv   rw   )r   r   r=   related_renew_flagr   r   cds_custom_periodr(   cds_custom_period_listcustom_periodr)   r+   s               r   purchase_reserved_instance$BccClient.purchase_reserved_instanceY  s    T --k:,?:G!#(Rc%dRc&<&<Rc"%d''5
 $(46F %)+F ));%&!!,"2"2D$**T:J)/ " @ 	@% &es   B'c                 B    SnU R                  [        R                  X!S9$ )a~  
The interface will be deprecated in the future,
we suggest to use triad (instanceType, cpuCount, memoryCapacityInGB) to specified the instance configuration.
Listing all of specification for instance resource to buy.
See more detail on
https://bce.baidu.com/doc/BCC/API.html#.E5.AE.9E.E4.BE.8B.E5.A5.97.E9.A4.90.E8.A7.84.E6.A0.BC

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/specr  r   r   r   r(   s      r   list_instance_specsBccClient.list_instance_specs  s%     !!!,"2"2D!HHr   )cds_size_in_gbc                    Sn0 nUc  [        5       US'   OUUS'   Uc  [        nUUR                  S.nUb  UUS'   Ub  UUS'   Ub  UUS'   U
b  U
US'   Ub  UUS'   Ub  UUS	'   Ub  UUS
'   Ub!  U Vs/ s H  nUR                  PM     nnUUS'   Ub  UR                  US'   Ub  UUS'   U	b  U	US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   U R                  [        R
                  U[        R                  " U5      UUS9$ s  snf )a
  
Create a volume with the specified options.
You can use this method to create a new empty volume by specified options
or you can create a new volume from customized volume snapshot but not system disk snapshot.
By using the cdsSizeInGB parameter you can create a newly empty volume.
By using snapshotId parameter to create a volume form specific snapshot.

:param cds_size_in_gb:
    The size of volume to create in GB.
    By specifying the snapshotId,
    it will create volume from the specified snapshot and the parameter cdsSizeInGB will be ignored.
:type cds_size_in_gb: int

:param billing:
    Billing information.Deprecated
:type billing: bcc_model.Billing

:param purchase_count:
    The optional parameter to specify how many volumes to buy, default value is 1.
    The maximum to create for one time is 5.
:type purchase_count: int

:param storage_type:
    The storage type of volume, see more detail in
    https://bce.baidu.com/doc/BCC/API.html#StorageType
:type storage_type: menu{'hp1', 'std1'}

:param zone_name:
    The optional parameter to specify the available zone for the volume.
    See more detail through list_zones method
:type zone_name: string

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:param instance_id:
:type instance_id: string

:param encrypt_key:
:type encrypt_key: string

:param name:
:type name: string

:param description:
:type description: string

:param renew_time_unit:
:type renew_time_unit: string

:param renew_time:
:type renew_time: int

:param cluster_id:
    cds cluster id
:type cluster_id: string

:param relation_tag:
:type relation_tag: boolean

:param tags:
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:param auto_snapshot_policy:
    The optional auto snapshot policy to be bonded.
:type auto_snapshot_policy: bcc_model.AutoSnapshotPolicyModel

:param charge_type:
    The optional parameter to specify the payment for the volume.
    The billing type and payment method, including Prepaid and Postpaid,
    need to be specified only when the instanceId is not empty and the corresponding instance type is prepaid.
    If instanceId is empty:
       create a post payment type CDS;
    If the instanceId is not empty:
      If the instance is prepaid, a chargeType needs to be specified;
      If the instance is post paid, create a post paid CDS
:type charge_type: menu{'Prepaid', 'Postpaid'}

:return:
:rtype baidubce.bce_response.BceResponse
   /volumer7   )cdsSizeInGBr=   rN   storageTyperQ   renewTimeUnit	renewTime	clusterIdrC   rj   autoSnapshotPolicyrO   description
encryptKeyr   
chargeTypern   rp   rq   rr   r-   r	   ru   rv   rw   )r   r  r=   r   storage_typer   r   encrypt_keyrO   r  renew_time_unit
renew_time
cluster_idr   rj   auto_snapshot_policyr   r   charge_typer(   r+   r)   r   r   s                           r   create_volume_with_cds_size%BccClient.create_volume_with_cds_size  s   @ $9$;F=!$0F=!?9G)''
 %$2D!#".D (D&$3D!! *D! *D#".D045H5#DL+)=)F)FD%&DL""-D"!,D"!,D"!,D!!,"3"3T4::d;K)/ " @ 	@ 6   2C>)snapshot_idc                    Sn0 nUc  [        5       US'   OUUS'   Uc  [        nUUR                  S.nUb  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS	'   Ub  UUS
'   Ub!  U Vs/ s H  nUR                  PM     nnUUS'   Ub  UR                  US'   U	b  U	US'   U
b  U
US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   U R                  [        R
                  U[        R                  " U5      UUS9$ s  snf )a
  
Create a volume with the specified options.
You can use this method to create a new empty volume by specified options
or you can create a new volume from customized volume snapshot but not system disk snapshot.
By using the cdsSizeInGB parameter you can create a newly empty volume.
By using snapshotId parameter to create a volume form specific snapshot.

:param snapshot_id:xx
    The id of snapshot.
    By specifying the snapshotId,
    it will create volume from the specified snapshot and the parameter cdsSizeInGB will be ignored.
:type snapshot_id: string

:param billing:
    Billing information.Deprecated
:type billing: bcc_model.Billing

:param purchase_count:
    The optional parameter to specify how many volumes to buy, default value is 1.
    The maximum to create for one time is 5.
:type purchase_count: int

:param storage_type:
    The storage type of volume, see more detail in
    https://bce.baidu.com/doc/BCC/API.html#StorageType
:type storage_type: menu{'hp1', 'std1'}

:param zone_name:
    The optional parameter to specify the available zone for the volume.
    See more detail through list_zones method
:type zone_name: string

:param instance_id:
:type instance_id: string

:param encrypt_key:
:type encrypt_key: string

:param name:
:type name: string

:param description:
:type description: string

:param renew_time_unit:
:type renew_time_unit: string

:param renew_time:
:type renew_time: int

:param cluster_id:
    cds cluster id
:type cluster_id: string

:param relation_tag:
:type relation_tag: boolean

:param tags:
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:param auto_snapshot_policy:
    The optional auto snapshot policy to be bonded.
:type auto_snapshot_policy: bcc_model.AutoSnapshotPolicyModel

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:param charge_type:
    The optional parameter to specify the payment for the volume.
    The billing type and payment method, including Prepaid and Postpaid,
    need to be specified only when the instanceId is not empty and the corresponding instance type is prepaid.
    If instanceId is empty:
       create a post payment type CDS;
    If the instanceId is not empty:
      If the instance is prepaid, a chargeType needs to be specified;
      If the instance is post paid, create a post paid CDS
:type charge_type: menu{'Prepaid', 'Postpaid'}

:return:
:rtype baidubce.bce_response.BceResponse
r  r7   )
snapshotIdr=   rN   r  rQ   r  r  r  rC   rj   r  rO   r  r  r   r  rn   r  )r   r  r=   r   r  r   r   r   r  rO   r  r  r  r  r   rj   r  r   r  r(   r+   r)   r   r   s                           r   create_volume_with_snapshot_id(BccClient.create_volume_with_snapshot_id8  s   @ $9$;F=!$0F=!?9G%''
 %$2D!#".D (D&$3D!! *D! *D#".D045H5#DL+)=)F)FD%&DL""-D"!,D"!,D"!,D!!,"3"3T4::d;K)/ " @ 	@ 6r  c                     Sn0 n	Ub  XS'   Ub  X)S'   Ub  X9S'   Ub  XIS'   Ub  XYS'   Ub  XiS'   U R                  [        R                  XUS9$ )	a  
Listing volumes owned by the authenticated user.

:param instance_id:
    The id of instance. The optional parameter to list the volume.
    If it's specified,only the volumes attached to the specified instance will be listed.
:type instance_id: string

:param zone_name:
    The name of available zone. The optional parameter to list volumes
:type zone_name: string

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

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

:param cluster_id:
:type cluster_id: string

:param volume_ids:
:type volume_ids: string

:return:
:rtype baidubce.bce_response.BceResponse
r  r   rQ   r   r   r  	volumeIdsrn   r   )
r   r   r   r   r   r  
volume_idsr   r(   r+   s
             r   list_volumesBccClient.list_volumes  s    J "#.<  !*:%8 (9!",;!",;!!,"2"2DPV!WWr   )	volume_idc                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )z
Get the detail information of specified volume.

:param volume_id:
    The id of the volume.
:type volume_id: string

:return:
:rtype baidubce.bce_response.BceResponse

   /volume/%sr  rk  r   r  r   r(   s       r   
get_volumeBccClient.get_volume  s:     ++I6	y(!!,"2"2D!HHr   )r  r   c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )a  
Attaching the specified volume to a specified instance.
You can attach the specified volume to a specified instance only
when the volume is Available and the instance is Running or Stopped,
otherwise, it's will get 409 errorCode.

:param volume_id:
    The id of the volume which will be attached to specified instance.
:type volume_id: string

:param instance_id:
    The id of the instance which will be attached with a volume.
:type instance_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r  r   attachNrn   r   r   r  r   r   r(   r)   r+   s          r   attach_volumeBccClient.attach_volume		  l    ( ++I6	y(+
 d
 !!,"2"2D$**T:J)/ " @ 	@r   c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )a  
Detaching the specified volume from a specified instance.
You can detach the specified volume from a specified instance only
when the instance is Running or Stopped ,
otherwise, it's will get 409 errorCode.

:param volume_id:
    The id of the volume which will be attached to specified instance.
:type volume_id: string

:param instance_id:
    The id of the instance which will be attached with a volume.
:type instance_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r  r   detachNrn   r   r  s          r   detach_volumeBccClient.detach_volume(	  r  r   c                 z    SnSU0n0 nU R                  [        R                  U[        R                  " U5      XRS9$ )a  
List all region's endpoint information with the specific parameters.
Use global endpoint bcc.baidubce.com to get BCC,CDS,ReservedInstance's endpoint.

:param region:
    The id of region.
:type region: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /region/describeRegionsregionrn   r-   r	   ru   rv   rw   )r   r  r   r(   r)   r+   s         r   describe_regionsBccClient.describe_regionsG	  sN     *f
 !!,"3"3T4::d;K)/ " @ 	@r   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )aR  
Releasing the specified volume owned by the user.
You can release the specified volume only
when the instance is among state of  Available/Expired/Error,
otherwise, it's will get 409 errorCode.

:param volume_id:
    The id of the volume which will be released.
:type volume_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r  r  r  r  s       r   release_volumeBccClient.release_volume\	  s:     ++I6	y(!!,"5"5t!KKr   )r  new_cds_sizec                     [         R                  " U5      nSU-  nSU0nUb  X7S'   SnUc  S[        5       S.nOSUS.nU R                  [        R
                  U[        R                  " U5      XS9$ )a  
Resizing the specified volume with newly size.
You can resize the specified volume only when the volume is Available,
otherwise, it's will get 409 errorCode.
The prepaid volume can not be downgrade.
This is an asynchronous interface,
you can get the latest status by BccClient.get_volume.

:param volume_id:
    The id of volume which you want to resize.
:type volume_id: string

:param new_cds_size:
    The new volume size you want to resize in GB.
:type new_cds_size: int

:param new_volume_type:
    detail information see: https://cloud.baidu.com/doc/BCC/s/6jwvyo0q2#storagetype
:type new_volume_type: string

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
r  newCdsSizeInGBNnewVolumeTyper'  rn   r)  )	r   r  r  new_volume_typer   r   r(   r)   r+   s	            r   resize_volumeBccClient.resize_volumeo	  s    H ++I6	y(l
 &$3!46F +F !!,"2"2D$**T:J)/ " @ 	@r   )r  r  c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )a  
Rollback the volume with the specified volume snapshot.
You can rollback the specified volume only when the volume is Available,
otherwise, it's will get 409 errorCode.
The snapshot used to rollback must be created by the volume,
otherwise,it's will get 404 errorCode.
If rolling back the system volume,the instance must be Running or Stopped,
otherwise, it's will get 409 errorCode.After rolling back the
volume,all the system disk data will erase.

:param volume_id:
    The id of volume which will be rollback.
:type volume_id: string

:param snapshot_id:
    The id of snapshot which will be used to rollback the volume.
:type snapshot_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r  r  rollbackNrn   r   )r   r  r  r   r(   r)   r+   s          r   rollback_volumeBccClient.rollback_volume	  sl    0 ++I6	y(+
 
 !!,"2"2D$**T:J)/ " @ 	@r   c                     [         R                  " U5      nSU-  nUc  [        nUR                  US.nSnUc  S[	        5       S.nOSUS.nU R                  [        R                  U[        R                  " U5      XS9$ )aY  
PurchaseReserved the instance with fixed duration.
You can not purchaseReserved the instance which is resizing.
This is an asynchronous interface,
you can get the latest status by BccClient.get_volume.

:param volume_id:
    The id of volume which will be renew.
:type volume_id: string

:param billing:
    Billing information.
:type billing: bcc_model.Billing

:param instance_id:
    The id of instance to align renew duarion.

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
r  N)r=   r   rp  rn   rs  )	r   r  r=   r   r   r   r(   r)   r+   s	            r   purchase_reserved_volume"BccClient.purchase_reserved_volume	  s    H ++I6	y(?:G''%
 $(46F %)+F !!,"2"2D$**T:J)/ " @ 	@r   )r  cds_namer  c                     [         R                  " U5      nSU-  nSU0nUb  X6S'   SS0nU R                  [        R                  U[
        R                  " U5      XtS9$ )z~
:param volume_id:
:type volume_id: string

:param cds_name:
:type cds_name:string

:param desc:
:type desc: string

:return:
r  cdsNameNr  modifyrn   r   )r   r  r  r  r   r(   r)   r+   s           r   modify_volume_Attribute!BccClient.modify_volume_Attribute
  s{    ( ++I6	y( x
 Ld
 !!,"2"2D$**T:J)/ " @ 	@r   c                     [         R                  " U5      nSU-  nUc  [        nSUR                  0nSS0nU R	                  [
        R                  U[        R                  " U5      XcS9$ )z
:param volume_id: volume id
:type volume_id: string
:param billing: payment information
:type billing: bcc_model.Billing
:param config:

:return:
:rtype baidubce.bce_response.BceResponse
r  Nr=   modifyChargeTypern   )	r   r   rt  rr   r-   r	   r   rv   rw   )r   r  r=   r   r(   r)   r+   s          r   modify_volume_charge_type#BccClient.modify_volume_charge_type'
  s|     ++I6	y(?:Gw''

 
 !!,"2"2D$**T:J)/ " @ 	@r   )
image_namer   c                     SnSn	Uc  S[        5       0n	OSU0n	UUS.n
Ub  X:S'   Ub  XJS'   U(       a  XzS'   U R                  [        R                  U[        R
                  " U
5      XS9$ )	a  
Creating a customized image which can be used for creating instance.
You can create an image from an instance with this method.
While creating an image from an instance, the instance must be Running or Stopped,
otherwise, it's will get 409 errorCode.
This is an asynchronous interface,
you can get the latest status by BccClient.get_image.

:param image_name:
    The name for the image that will be created.
    The name length from 1 to 65,only contains letters,digital and underline.
:type image_name: string

:param instance_id:
    The optional parameter specify the id of the instance which will be used to create the new image.
    When instanceId and snapshotId are specified ,only instanceId will be used.
:type instance_id: string

:param encrypt_key:
:type encrypt_key: string

:param relate_cds:
:type relate_cds: boolean

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
   /imageNr7   )	imageNamer   r  	relateCds	detectionrn   r   )r   r  r   r  
relate_cdsr   r   r  r(   r+   r)   s              r   create_image_from_instance_id'BccClient.create_image_from_instance_idE
  s    \ 46F
 |F $%
 "!,! * )!!,"3"3T4::d;K)/ " @ 	@r   )r  r  c                     Sn0 nUc  [        5       US'   OXHS'   UUS.n	Ub  X9S'   U(       a  XiS'   U R                  [        R                  U[        R
                  " U	5      XS9$ )a  
Creating a customized image which can be used for creating instance.
You can create an image from an snapshot with tihs method.
You can create the image only from system snapshot.
While creating an image from a system snapshot,the snapshot must be Available,
otherwise, it's will get 409 errorCode.
This is an asynchronous interface,
you can get the latest status by BccClient.get_image.

:param image_name:
    The name for the image that will be created.
    The name length from 1 to 65,only contains letters,digital and underline.
:type image_name: string

:param snapshot_id:
    The optional parameter specify the id of the snapshot which will be used to create the new image.
    When instanceId and snapshotId are specified ,only instanceId will be used.
:type snapshot_id: string

:param encrypt_key:
:type encrypt_key: string

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
r  r7   )r  r  r  r  rn   r   )
r   r  r  r  r   r   r  r(   r+   r)   s
             r   create_image_from_snapshot_id'BccClient.create_image_from_snapshot_id
  s    V $9$;F=!$0=!#%
 "!, )!!,"3"3T4::d;K)/ " @ 	@r   c                 v    SnSU0nUb  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R                  XgUS9$ )a  
Listing images owned by the authenticated user.

:param image_type:
    The optional parameter to filter image to list.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#ImageType"
:type image_type: menu{'All', System', 'Custom', 'Integration'}

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

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

:param image_name:
    The optional parameter to query specified custom image by image name.
:type image_name: string

:return:
:rtype baidubce.bce_response.BceResponse
r  	imageTyper   r   r  rn   r   )r   
image_typer   r   r  r   r(   r+   s           r   list_imagesBccClient.list_images
  s`    < 
 %8 (9!",;!!,"2"2DPV!WWr   )r4   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )z
Get the detail information of specified image.

:param image_id:
    The id of image.
:type image_id: string

:return:
:rtype baidubce.bce_response.BceResponse
	   /image/%sr  rk  r   r4   r   r(   s       r   	get_imageBccClient.get_image
  s:     **84h&!!,"2"2D!HHr   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )z
Deleting the specified image.
Only the customized image can be deleted,
otherwise, it's will get 403 errorCode.

:param image_id:
    The id of image.
:type image_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r  r  r  r  s       r   delete_imageBccClient.delete_image   s:     **84h&!!,"5"5t!KKr   )r4   rO   destRegionsc                     [         R                  " U5      nSU-  nUUS.nSS0nU R                  [        R                  U[
        R                  " U5      XtS9$ )zK
:param image_id:
:param name:
:param destRegions:
:param config:
:return:
r  )rO   
destRegion
remoteCopyNrn   r   r   r-   r	   ru   rv   rw   )r   r4   rO   r  r   r(   r)   r+   s           r   remote_copy_imageBccClient.remote_copy_image  so     **84h& %

 $
 !!,"3"3T4::d;K)/ " @ 	@r   c                 ~    [         R                  " U5      nSU-  nSS0nU R                  [        R                  X4US9$ )*
:param image_id:
:param config:
:return:
r  cancelRemoteCopyNrn   )r   r   r-   r	   ru   )r   r4   r   r(   r+   s        r   cancle_remote_copy_image"BccClient.cancle_remote_copy_image.  sM     **84h& 
 !!,"3"3TQW!XXr   c                     [         R                  " U5      nSU-  n0 nUb  X'S'   Ub  X7S'   Ub  XGS'   SS0nU R                  [        R                  U[
        R                  " U5      XS9$ )aO  
:param image_id: image id
:type image_id: string
:param account: share image to target account
:type account: string
:param account_id: share image to target account_id
:type account_id: string
:param ucaccount: share image to target ucaccount
:type ucaccount: string
:param config:

:return:
:rtype baidubce.bce_response.BceResponse
r  Naccount	accountId	ucAccountsharern   r  	r   r4   r  
account_id	ucaccountr   r(   r)   r+   s	            r   share_imageBccClient.share_image?  s    * **84h&%O! *  ) T
 !!,"3"3T4::d;K)/ " @ 	@r   c                     [         R                  " U5      nSU-  n0 nUb  X'S'   Ub  X7S'   Ub  XGS'   SS0nU R                  [        R                  U[
        R                  " U5      XS9$ )a[  
:param image_id: image id
:type image_id: string
:param account: unshare image with target account
:type account: string
:param account_id: unshare image with target account_id
:type account_id: string
:param ucaccount: unshare image with target ucaccount
:type ucaccount: string
:param config:

:return:
:rtype baidubce.bce_response.BceResponse
r  Nr  r  r  unsharern   r  r  s	            r   unshare_imageBccClient.unshare_imagee  s    * **84h&%O! *  ) t
 !!,"3"3T4::d;K)/ " @ 	@r   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )r  s   /image/%s/sharedUsersr  rk  r  s       r   list_shared_userBccClient.list_shared_user  s:     **84'(2!!,"2"2D!HHr   )r   c                 z    SnUnSU0nU R                  [        R                  U[        R                  " U5      US9$ )z.
:param instance_ids:
:param config:
:return:
s	   /image/osr   r  r  )r   r   r   r(   instance_id_listr)   s         r   list_osBccClient.list_os  sH     '+
 !!,"3"3T4::d;KTZ![[r   )r  snapshot_namec                     SnSnUc  S[        5       0nOSU0nUUS.n	Ub  X9S'   Ub  U V
s/ s H  oR                  PM     nn
XS'   U R                  [        R                  U[
        R                  " U	5      XS9$ s  sn
f )a	  
Creating snapshot from specified volume.
You can create snapshot from system volume and CDS volume.
While creating snapshot from system volume,the instance must be Running or Stopped,
otherwise, it's will get 409 errorCode.
While creating snapshot from CDS volume, the volume must be InUs or Available,
otherwise, it's will get 409 errorCode.
This is an asynchronous interface,
you can get the latest status by BccClient.get_snapshot.

:param volume_id:
    The id which specify where the snapshot will be created from.
    If you want to create an snapshot from a customized volume, a id of the volume will be set.
    If you want to create an snapshot from a system volume, a id of the instance will be set.
:type volume_id: string

:param snapshot_name:
    The name for the snapshot that will be created.
    The name length from 1 to 65,only contains letters,digital and underline.
:type snapshot_name: string

:param desc:
    The optional parameter to describe the information of the new snapshot.
:type desc: string

:param tags:
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
	   /snapshotNr7   )volumeIdsnapshotNamer  rj   rn   rp   rr   r-   r	   ru   rv   rw   )r   r  r
  r  rj   r   r   r(   r+   r)   r   r   s               r   create_snapshotBccClient.create_snapshot  s    d 46F
 |F ")
 L045H5#L!!,"3"3T4::d;K)/ " @ 	@ 6s   A;c                     SnSnUc  Uc  Ub  0 nUb  XS'   Ub  X&S'   Ub  X6S'   U R                  [        R                  XVUS9$ )ad  
List snapshots

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

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

:param volume_id:
    The id of the volume.
:type volume_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r  Nr   r   r  rn   r   )r   r   r   r  r   r(   r+   s          r   list_snapshotsBccClient.list_snapshots  sl    . !59NF%8 (9 !*:!!,"2"2DPV!WWr   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )z
Get the detail information of specified snapshot.

:param snapshot_id:
    The id of snapshot.
:type snapshot_id: string

:return:
:rtype baidubce.bce_response.BceResponse
   /snapshot/%sr  rk  r   r  r   r(   s       r   get_snapshotBccClient.get_snapshot  s:     --k:,!!,"2"2D!HHr   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )a   
Deleting the specified snapshot.
Only when the snapshot is CreatedFailed or Available,the specified snapshot can be deleted.
otherwise, it's will get 403 errorCode.

:param snapshot_id:
    The id of snapshot.
:type snapshot_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r  r  r  r  s       r   delete_snapshotBccClient.delete_snapshot$  s:     --k:,!!,"5"5t!KKr   rO   rulesc                 N   SnSn	Uc  S[        5       0n	OSU0n	U V
s/ s H  oR                  PM     nn
UUS.nUb  X<S'   Ub  XLS'   Ub  U Vs/ s H  oR                  PM     nnXS'   U R                  [        R                  U[
        R                  " U5      XS9$ s  sn
f s  snf )	a  
Creating a newly SecurityGroup with specified rules.

:param name:
    The name of SecurityGroup that will be created.
:type name: string

:param rules:
    The list of rules which define how the SecurityGroup works.
:type rules: list<bcc_model.SecurityGroupRuleModel>

:param vpc_id:
    The optional parameter to specify the id of VPC to SecurityGroup
:type vpc_id: string

:param desc:
    The optional parameter to describe the SecurityGroup that will be created.
:type desc: string

:param tags:
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
   /securityGroupNr7   r  r   r  rj   rn   r  )r   rO   r  r   r  r   rj   r   r(   r+   rule	rule_listr)   r   r   s                  r   create_security_groupBccClient.create_security_group6  s    Z !46F
 |F 055ut]]u	5
 "ML045H5#L!!,"3"3T4::d;K)/ " @ 	@ 6 6s   BB"c                     Sn0 nUb  XS'   Ub  X(S'   Ub  X8S'   Ub  XHS'   Ub  XXS'   U R                  [        R                  UXS9$ )a  
Listing SecurityGroup owned by the authenticated user.

:param instance_id:
    The id of instance. The optional parameter to list the SecurityGroup.
    If it's specified,only the SecurityGroup related to the specified instance will be listed
:type instance_id: string

:param vpc_id:
    filter by vpcId, optional parameter
:type vpc_id: string

:param security_group_ids:
    filter by securityGroupIds, optional parameter
:type security_group_ids: string

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

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

:return:
:rtype baidubce.bce_response.BceResponse
r   r   r   rU   r   r   rn   r   )	r   r   r   r   r   r   r   r(   r+   s	            r   list_security_groupsBccClient.list_security_groups|  s|    B !"#.< $7O));%&%8 (9!!,"2"2D)/ " @ 	@r   )r   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )z
Deleting the specified SecurityGroup.

:param security_group_id:
    The id of SecurityGroup that will be deleted.
:type security_group_id: string

:return:
:rtype baidubce.bce_response.BceResponse
   /securityGroup/%sr  r  r   r   r   r(   s       r   delete_security_groupBccClient.delete_security_group  s=     #334EF#&77!!,"5"5t!KKr   )r   r!  c                     [         R                  " U5      nSU-  nSS0nUc  [        5       US'   OX6S'   SUR                  0nU R	                  [
        R                  U[        R                  " U5      XdS9$ )a  
authorize a security group rule to the specified security group

:param security_group_id:
    The id of SecurityGroup that will be authorized.
:type security_group_id: string

:param rule:
    security group rule detail.
    Through protocol/portRange/direction/sourceIp/sourceGroupId, we can confirmed only one rule.
:type rule: bcc_model.SecurityGroupRuleModel

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
r)  authorizeRule r7   r!  rn   	r   r   rp   rr   r-   r	   r   rv   rw   r   r   r!  r   r   r(   r+   r)   s           r   authorize_security_group_rule'BccClient.authorize_security_group_rule  s    8 #334EF#&77!2&$9$;F=!$0=!DMM
 !!,"2"2D$**T:J)/ " @ 	@r   c                     [         R                  " U5      nSU-  nSS0nUc  [        5       US'   OX6S'   SUR                  0nU R	                  [
        R                  U[        R                  " U5      XdS9$ )a  
revoke a security group rule from the specified security group
:param security_group_id:
    The id of SecurityGroup that will be revoked.
:type security_group_id: string
:param rule:
    security group rule detail.
    Through protocol/portRange/direction/sourceIp/sourceGroupId, we can confirmed only one rule.
:type rule: bcc_model.SecurityGroupRuleModel
:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string
:return:
:rtype baidubce.bce_response.BceResponse
r)  
revokeRuler/  r7   r!  rn   r0  r1  s           r   revoke_security_group_rule$BccClient.revoke_security_group_rule  s    . #334EF#&77#$9$;F=!$0=!DMM
 !!,"2"2D$**T:J)/ " @ 	@r   c           
          SnUUUUUUUUU	S.	nU R                  [        R                  U[        R                  " U5      SU
S9$ )aM  
uodate a security group rule from the specified security group
:param security_group_rule_id:
    security group rule id.
:param: remark:
    The remark for the rule.
:param: portrange:
    The port range to specify the port which the rule will work on.
    Available range is rang [0, 65535], the fault value is "" for all port.
:param: protocol:
    The parameter specify which protocol will the rule work on, the fault value is "" for all protocol.
    Available protocol are tcp, udp and icmp.
:param: source_ip:
    The source ip range with CIDR formats. The default value 0.0.0.0/0 (allow all ip address),
    other supported formats such as {ip_addr}/12 or {ip_addr}. Only supports IPV4.
    Only works for  direction = "ingress".
:param: sourcegroup_id:
    The source security group id. Cannot coexist with sourceIP.
:param: dest_ip:
    The destination ip range with CIDR formats. The default value 0.0.0.0/0 (allow all ip address),
    other supported formats such as {ip_addr}/12 or {ip_addr}. Only supports IPV4.
    Only works for  direction = "egress".
:param: destgroup_id:
    The destination security group id. Cannot coexist with destIP.
:param: priority:
    The parameter specify the priority of the rule(range 1-1000).
:param config:
    :type config: baidubce.BceClientConfiguration
:return:
:rtype baidubce.bce_response.BceResponse
s   /securityGroup/rule/update)	securityGroupRuleIdremark	directionprotocol	portRangesourceIpsourceGroupIddestIpdestGroupIdNrn   r   )r   security_group_rule_idr:  r;  r<  	portrange	source_ipsourcegroup_iddest_ipdestgroup_idr   r(   r)   s                r   update_security_group_rule$BccClient.update_security_group_rule  s`    R -#9" "!+'

 !!,"2"2D$**T:J)-f " > 	>r   )rB  c                 x    [         R                  " U5      nSU-  nU R                  [        R                  USUS9$ )a$  
delete a security group rule from the specified security group
:param security_group_rule_id:
    The id of SecurityGroupRule that will be deleted.
:type security_group_id: string
:param config:
:type config: baidubce.BceClientConfiguration
:return:
:rtype baidubce.bce_response.BceResponse
s   /securityGroup/rule/%sNrn   r  )r   rB  r   r(   s       r   delete_security_group_rule$BccClient.delete_security_group_ruleD  sB     "(!8!89O!P(+AA!!,"5"5tDQW!XXr   c                 x    [         R                  " U5      nSU-  nU R                  [        R                  USUS9$ )a  
get a security group detail from the specified security group
:param security_group_id:
    The id of security_group that will be deleted.
:type security_group_id: string
:param config:
:type config: baidubce.BceClientConfiguration
:return:
:rtype baidubce.bce_response.BceResponse
r)  Nrn   rk  r*  s       r   get_security_group_detail#BccClient.get_security_group_detailT  sA     #334EF#&77!!,"2"2Df!UUr   c                 B    SnU R                  [        R                  X!S9$ )zD
Get zone detail list within current region
:param config:
:return:
s   /zoner  r   r|  s      r   
list_zonesBccClient.list_zonesd  s%     !!,"2"2D!HHr   )asp_nametime_pointsrepeat_week_daysretention_daysc                     SnSnUc  S[        5       0nOSU0nUUUUS.n	U R                  [        R                  U[        R
                  " U	5      XS9$ )z
:param asp_name:
:param time_points:
:param repeat_week_days:
:param retention_days:
:param client_token:
:param config:
:return:
   /aspNr7   )rO   
timePointsrepeatWeekdaysretentionDaysrn   r   )
r   rS  rT  rU  rV  r   r   r(   r+   r)   s
             r   
create_aspBccClient.create_aspm  s{    ( 46F
 |F %.+	
 !!,"3"3T4::d;K)/ " @ 	@r   )r   r  c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ );
:param asp_id:
:param volume_ids:
:param config:
:return:
   /asp/%sr  r  Nrn   r   r   r   r  r   r(   r)   r+   s          r   
attach_aspBccClient.attach_asp  n     ((0F" 
 d
 !!,"2"2D$**T:J)/ " @ 	@r   c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )r_  r`  r  r  Nrn   r   ra  s          r   
detach_aspBccClient.detach_asp  rd  r   )r   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ z(
:param asp_id:
:param config:
:return:
r`  r  r  r   r   r   r(   s       r   
delete_aspBccClient.delete_asp  s:     ((0F"!!,"5"5t!KKr   c                     SnSnUc	  Uc  Uc  Ub  0 nUb  XS'   Ub  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R                  XgUS9$ )z^
:param marker:
:param max_keys:
:param asp_name:
:param volume_name:
:param config:
:return:
rX  Nr   r   aspName
volumeNamern   r   )r   r   r   rS  volume_namer   r(   r+   s           r   	list_aspsBccClient.list_asps  s     !59MQ\QhF%8 (9 (9"#.< !!,"2"2DPV!WWr   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ ri  rk  rj  s       r   get_aspBccClient.get_asp  s:     ((0F"!!,"2"2D!HHr   )keypair_namec                     SnUUS.nSS0nU R                  [        R                  U[        R                  " U5      XcS9$ )zC
:param keypair_name:
:param keypair_desc:
:param config:
:return:
   /keypair)rO   r  createNrn   r  )r   rv  keypair_descr   r(   r)   r+   s          r   create_keypairBccClient.create_keypair  sX      '

 d
 !!,"3"3T4::d;K)/ " @ 	@r   )rv  
public_keyc                     SnUUS.nUb  X&S'   SS0nU R                  [        R                  U[        R                  " U5      XtS9$ )zV
:param keypair_name:
:param keypair_desc:
:param public_key:
:param config:
:return:
rx  )rO   	publicKeyNr  importrn   r   )r   rv  rz  r}  r   r(   r)   r+   s           r   import_keypairBccClient.import_keypair	  sh      #
 #". d
 !!,"2"2D$**T:J)/ " @ 	@r   c                     SnSnUc  Uc  Ub  0 nUb  XS'   Ub  X&S'   Ub  X6S'   U R                  [        R                  XVUS9$ )z9
:param marker:
:param max_keys:
:param config:
:return:
rx  Nr   r   rO   rn   r   )r   r   r   rO   r   r(   r+   s          r   list_keypairsBccClient.list_keypairs%  sk     !59IF%8 (9!6N!!,"2"2DPV!WWr   )
keypair_idc                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ z,
:param keypair_id:
:param config:
:return:
   /keypair/%sr  rk  r   r  r   r(   s       r   get_keypairBccClient.get_keypair8  s:     ,,Z8

*!!,"2"2D!HHr   )r  r   c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )A
:param keypair_id:
:param instance_ids:
:param config:
:return:
r  r   r  Nrn   r   r   r  r   r   r(   r)   r+   s          r   attach_keypairBccClient.attach_keypairC  l     ,,Z8

*<
 d
 !!,"2"2D$**T:J)/ " @ 	@r   )r  r   c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )r  r  r   r  Nrn   r   r  s          r   detach_keypairBccClient.detach_keypair[  r  r   c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ r  r  r  s       r   delete_keypairBccClient.delete_keypairs  s:     ,,Z8

*!!,"5"5t!KKr   )r  rv  c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )zA
:param keypair_id:
:param keypair_name:
:param config:
:return:
r  rO   renameNrn   r   )r   r  rv  r   r(   r)   r+   s          r   rename_keypairBccClient.rename_keypair  sl     ,,Z8

*L
 d
 !!,"2"2D$**T:J)/ " @ 	@r   )r  rz  c                     [         R                  " U5      nSU-  nSU0nSS0nU R                  [        R                  U[
        R                  " U5      XcS9$ )zA
:param keypair_id:
:param keypair_desc:
:param config:
:return:
r  r  
updateDescNrn   r   )r   r  rz  r   r(   r)   r+   s          r   update_keypair_descBccClient.update_keypair_desc  sl     ,,Z8

*<
 $
 !!,"2"2D$**T:J)/ " @ 	@r   )cluster_size_in_gbc                 6   Sn0 nUb  XS'   Uc  [        5       US'   OXS'   [        R                  " XVUS9nUUUUR                  S.nU
b  U
US'   Ub  UUS'   Ub  UUS'   U	b  U	US	'   U R	                  [
        R                  U[        R                  " U5      XS
9$ )z
create_volume_cluster.
   /volume/clusteruuidFlagr7   )r   reservationLengthreservationTimeUnit)clusterSizeInGBr  rN   r=   rQ   clusterNamer  r  rn   )	rp   r
   Billingrr   r-   r	   ru   rv   rw   )r   r  r   r  cluster_namer   reservation_lengthreservation_time_unitr  r  r   	uuid_flagr   r   r(   r+   r=   r)   s                     r   create_volume_clusterBccClient.create_volume_cluster  s     " !*:$9$;F=!$0=!##-8MO  2'+''	
  (D#".D&$3D!! *D!!,"3"3T4::d;KTZ!jjr   c                     Sn0 nUb  XS'   Ub  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R                  XgUS9$ )z
list_volume_cluster.
r  r  rQ   r   r   rn   r   )r   r  r   r   r   r   r(   r+   s           r   list_volume_clusterBccClient.list_volume_cluster  se    
 "#$0=! !*:%8 (9!!,"2"2DPV!WWr   )r  c                 t    [         R                  " U5      nSU-  nU R                  [        R                  X2S9$ )z
Get cluster detail
   /volume/cluster/%sr  rk  )r   r  r   r(   s       r   get_volume_clusterBccClient.get_volume_cluster  s:    
 ,,Z8
$z1!!,"2"2D!HHr   )r  new_cluster_sizec                     [         R                  " U5      nSU-  nSU0nSnUc  S[        5       S.nOSUS.nU R                  [        R
                  U[        R                  " U5      XtS9$ )z
resize_volume_cluster
r  newClusterSizeInGBNr'  rn   r)  )r   r  r  r   r   r(   r)   r+   s           r   resize_volume_clusterBccClient.resize_volume_cluster  s     ,,Z8
$z1 "2
 46F +F !!,"2"2D$**T:JSY!iir   c                    [         R                  " U5      nSU-  n[        R                  " UUS9nSUR                  0nSn	Uc  S[        5       S.n	OSUS.n	U R                  [        R                  U[        R                  " U5      XS9$ )z
renew_volume_cluster
r  )r  r  r=   Nrp  rn   )r   r   r
   r  rr   rp   r-   r	   r   rv   rw   )
r   r  r  r  r   r   r(   r=   r)   r+   s
             r   renew_volume_clusterBccClient.renew_volume_cluster  s     ,,Z8
$z1##6H8MO w''
 $(46F %)+F !!,"2"2D$**T:J)/ " @ 	@r   c                     [         R                  " U5      nSnUUUS.nSnUc  S[        5       0nOSU0nU R                  [        R
                  U[        R                  " U5      XS9$ )z
autoRenew_volume_cluster
s   /volume/cluster/autoRenew)r  r  r  Nr7   rn   r   r   rp   r-   r	   ru   rv   rw   )	r   r  r  r  r   r   r(   r)   r+   s	            r   autoRenew_volume_cluster"BccClient.autoRenew_volume_cluster'  s     ,,Z8
+#,#

 46F
 |F !!,"3"3T4::d;K)/ " @ 	@r   c                     [         R                  " U5      nSnSU0nSnUc  S[        5       0nOSU0nU R                  [        R
                  U[        R                  " U5      XcS9$ )z!
cancel_autoRenew_volume_cluster
s   /volume/cluster/cancelAutoRenewr  Nr7   rn   r  )r   r  r   r   r(   r)   r+   s          r   cancel_autoRenew_volume_cluster)BccClient.cancel_autoRenew_volume_cluster@  s    
 ,,Z8
1
 46F
 |F !!,"3"3T4::d;K)/ " @ 	@r   c	                     Sn	0 n
Ub  XS'   Ub  X*S'   Ub  X:S'   Ub  XJS'   Ub  XZS'   Ub  XjS'   Ub  XzS'   U R                  [        R                  U	[        R                  " U
5      US	9$ )
at  
Lists recycled instances.

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

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

:param instance_id:
    The identified of instance to specifies one instance.
:type instance_id: string

:param name:
    The name of instance to specifies one instance.
:type name: string

:param payment_timing:
    The payment timing of instance order values: [prepay/postpay].
:type payment_timing: string

:param recycle_begin:
    The begintime of the recycled instances date range. FORMAT: yyyy-MM-dd'T'HH:mm:ss'Z'
:type recycle_begin: string

:param recycle_end:
    The endtime of the recycled instances date range. FORMAT: yyyy-MM-dd'T'HH:mm:ss'Z'
:type recycle_end: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /recycle/instancer   r   r   rO   r   recycleBegin
recycleEnd)r)   r   r  )r   r   r   r   rO   r   recycle_beginrecycle_endr   r(   r)   s              r   list_recycled_instances!BccClient.list_recycled_instancesV  s    P $#N&O"!,L%$2!$#0 "!,!!,"3"3T

4@PY_!``r   )r>   r4   c9                 |   Sn90 n:U)c  [        5       U:S'   OU)U:S'   Uc  [        nUUUR                  S.n;US:w  a  UU;S'   Ub  UU;S'   Ub   U V<s/ s H  n<U<R                  PM     sn<U;S'   US:w  a  UU;S'   Ub  UU;S	'   U
S:  a  U
U;S
'   Ub  UU;S'   Ub  UU;S'   Ub  UU;S'   Ub  UU;S'   Ub1  U R                  R                  R
                  n=[        UU=5      n>U>U;S'   Ub  UU;S'   Ub  UU;S'   Ub  UU;S'   Ub  UU;S'   Ub  UU;S'   Ub  UU;S'   US:w  a  UU;S'   Uc  SU;S'   OUU;S'   Ub   U V?s/ s H  n?U?R                  PM     sn?U;S'   U"b  U"U;S'   U#b  U#U;S'   U$b  U$U;S'   U b  U U;S'   U!b  U!U;S'   Ub  UU;S'   U	b  U	U;S '   Ub  UU;S!'   Ub  UU;S"'   Ub  UU;S#'   Ub  UU;S$'   Ub!  U V@s/ s H  n@U@R                  PM     nAn@UAU;S%'   U%b  U%U;S&'   U&b  U&U;S''   U'b  U'U;S('   U(b  U(U;S)'   UU;S*'   U+b  U+U;S+'   U,b  U,U;S,'   U.b  U.U;S-'   U-b  U-U;S.'   U/b  U/U;S/'   U0b  U0U;S0'   U1b  U1U;S1'   U2b  U2U;S2'   U3b  U3U;S3'   U4b!  U4 VBs/ s H  nBUBR                  PM     nCnBUCU;S4'   U5b  U5U;S5'   U6b  U6U;S6'   U7b  U7U;S7'   U8b  U8U;S8'   U R                  [        R                  U9[        R                  " U;5      U:U*S99$ s  sn<f s  sn?f s  sn@f s  snBf ):ak#  
Create a bcc Instance with the specified options.
You must fill the field of clientToken,which is especially for keeping idempotent.
This is an asynchronous interface,
you can get the latest status by BccClient.get_instance.
:param spec:
    The specification of the BBC package.
:type spec: string

:param image_id:
    The id of image, list all available image in BccClient.list_images.
:type image_id: string

:param billing:
    Billing information.
:type billing: bcc_model.Billing

:param create_cds_list:
    The optional list of volume detail info to create.
:type create_cds_list: list<bcc_model.CreateCdsModel>

:param network_capacity_in_mbps:
    The optional parameter to specify the bandwidth in Mbps for the new instance.
    It must among 0 and 200, default value is 0.
    If it's specified to 0, it will get the internal ip address only.
:type network_capacity_in_mbps: int

:param eip_name:
    eip name
:type eip_name: string

:param purchase_count:
    The number of instance to buy, the default value is 1.
:type purchase_count: int

:param name:
    The optional parameter to desc the instance that will be created.
:type name: string

:param hostname:
    The optional parameter to specify the host name of the instance virtual machine.
    By default, hostname is not specified.
    If hostname is specified: hostname is used as the prefix of the name in batches.
    The backend will add a suffix, and the suffix generation method is: name{-serial number}.
    If name is not specified, it will be automatically generated using the following method:
    {instance-eight-digit random string-serial number}.
    Note: The random string is generated from the characters 0-9 and a-z;
    the serial number increases sequentially according to the magnitude of count.
    If count is 100, the serial number increases from 000~100, and if it is 10, it increases from 00~10.
    Only lowercase letters, numbers and - . special characters are supported.
    They must start with a letter. Special symbols cannot be used continuously.
    Special symbols are not supported at the beginning or end. The length is 2-64.
:type hostname: string

:param auto_seq_suffix:
    The parameter to specify whether name and hostname order suffixes are automatically generated.
:type auto_seq_suffix: boolean

:param is_open_hostname_domain:
    The parameter to specify whether hostname domain is automatically generated
:type is_open_hostname_domain: boolean

:param admin_pass:
    The optional parameter to specify the password for the instance.
    If specify the adminPass,the adminPass must be a 8-16 characters String
    which must contains letters, numbers and symbols.
    The symbols only contains "!@#$%^*()".
    The adminPass will be encrypted in AES-128 algorithm
    with the substring of the former 16 characters of user SecretKey.
    If not specify the adminPass, it will be specified by an random string.
    See more detail on
    https://bce.baidu.com/doc/BCC/API.html#.7A.E6.31.D8.94.C1.A1.C2.1A.8D.92.ED.7F.60.7D.AF
:type admin_pass: string

:param zone_name:
    The optional parameter to specify the available zone for the instance.
    See more detail through list_zones method
:type zone_name: string

:param subnet_id:
    The optional parameter to specify the id of subnet from vpc, optional param
     default value is default subnet from default vpc
:type subnet_id: string

:param security_group_id:
    The optional parameter to specify the securityGroupId of the instance
    vpcId of the securityGroupId must be the same as the vpcId of subnetId
    See more detail through listSecurityGroups method
:type security_group_id: string

:param enterprise_security_group_id:
    enterprise_security_group_id
:type enterprise_security_group_id: string

:param security_group_ids:
    security_group_ids
:type security_group_ids: list<string>

:param enterprise_security_group_ids:
    enterprise_security_group_ids
:type enterprise_security_group_ids: list<string>

:param relation_tag:
    The parameter to specify whether the instance related to existing tags
:type relation_tag: boolean

:param ehc_cluster_id:
    The id of ehcCluster.
:type ehc_cluster_id: string

:param is_open_ipv6:
    The parameter indicates whether the instance to be created is enabled for IPv6.
    It can only be enabled when both the image and subnet support IPv6.
    True indicates enabled, false indicates disabled,
    and no transmission indicates automatic adaptation of the image and subnet's IPv6 support
:type is_open_ipv6: boolean

:param deploy_id_list:
    This parameter is the list of deployment set IDs where the specified instance is located.
:type deploy_id_list: list<string>

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:param root_disk_size_in_gb:
    The parameter to specify the root disk size in GB.
    The root disk excludes the system disk, available is 40-500GB.
:type root_disk_size_in_gb: int

:param root_disk_storage_type:
    The parameter to specify the root disk storage type.
    Default use of HP1 cloud disk.
:type root_disk_storage_type: string

:param ephemeral_disks:
    The optional list of ephemeral volume detail info to create.
:type ephemeral_disks: list<bcc_model.EphemeralDisk>

:param dedicate_host_id
    The parameter to specify the dedicate host id.
:type dedicate_host_id: string

:param auto_renew_time_unit
    The parameter to specify the unit of the auto renew time.
    The auto renew time unit can be "month" or "year".
    The default value is "month".
:type auto_renew_time_unit: string

:param auto_renew_time
    The parameter to specify the auto renew time, the default value is 0.
:type auto_renew_time: int

:param tags
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:param deploy_id
    The parameter to specify the id of the deploymentSet.
:type deploy_id: string

:param bid_model
    The parameter to specify the bidding model.
    The bidding model can be "market" or "custom".
:type bid_model: string

:param bid_price
    The parameter to specify the bidding price.
    When the bid_model is "custom", it works.
:type bid_price: string

:param key_pair_id
    The parameter to specify id of the keypair.
:type key_pair_id: string

:param asp_id
    The parameter to specify id of the asp.
:type asp_id: string

:param internet_charge_type
    The parameter to specify the internet charge type.
    See more detail on
    https://cloud.baidu.com/doc/BCC/API.html#InternetChargeType
:type internet_charge_type: string

:param cds_auto_renew
    The parameter to specify whether the cds is auto renew or not.
    The default value is false.
:type cds_auto_renew: boolean

:param enable_jumbo_frame:
    The parameter indicates whether the instance is enabled for JumboFrame.
    It can only be enabled when the flavor support JumboFrame.
    True indicates enabled, false indicates disabled,
:type enable_jumbo_frame: bool

:param cpu_thread_config:
    Manage hyper - threading, which is the same on both Intel and AMD platforms.
:type cpu_thread_config: string

:param numa_config:
    Manage NPS on AMD platforms. Manage NUMA on Intel platforms.
:type numa_config: string

:param eni_ids:
    The optional list of eni short ids to attach.
    The number of eniIds must be an integer multiple of the number of instances.
    The enis must in the same vpc and available zone with instance.
:type eni_ids: list<string>

:param user_data:
:type user_data: string

:param is_open_hosteye:
:type is_open_hosteye: boolean

:param hosteye_type:
:type hosteye_type: string

:param res_group_id:
    The optional parameter to specify the resGroupId of the instance
:type res_group_id: string

:param enable_ht:
    Whether to enable HT (used by EBC). Default: true
:type enable_ht: bool

:param data_partition_type:
    Data disk file system format.Available values: xfs, ext4.
:type data_partition_type: bool

:param root_partition_type:
    System disk file system format.Available values: xfs, ext4.
:type root_partition_type: bool

:param deletion_protection:
:type deletion_protection: int

:param spec_id:
    Identify of the spec.

:param file_systems:
    This parameter is obsolete.
:type file_systems:list<bcc_model.FileSystemModel>

:param disable_root_disk_serial:
    Whether to hide the system disk SN during instance creation. Default: false
:type disable_root_disk_serial: bool

:param internal_ips:
    The parameter to specify the internal ips.
:type internal_ips: list<string>

:param network_purchase_type:
    EIP line type, including Standard BGP (BGP) and Enhanced BGP (BGP_S).The default value is Standard BGP.
:type network_purchase_type: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instanceBySpecr7   )r>   r<   r=   r   rJ   rK   rL   rM   r?   rN   rO   r@   rA   rB   rP   rQ   rR   rS   rT   rU   rV   r^   r_   r`   ra   rb   rc   deployIdListrd   re   rf   rg   rh   rC   rW   rD   rj   r  cpuThreadConfig
numaConfigeniIdsrm   rF   r   rG   rH   hosteyeTyperl   enableHtdataPartitionTyperootPartitionTyperE   disableRootDiskSerialrk   networkPurchaseTyper]   rn   ro   )Dr   r>   r4   rz   r{   r|   ry   r   r   r   r   rO   r@   r   r   r   r=   r   r   r   r   r   r   r   r   r   rj   r   r~   r   r   r   r   r   r}   r   deploy_id_listr  cpu_thread_confignuma_configeni_idsr   r   r   r   r   r   hosteye_typer   	enable_htdata_partition_typeroot_partition_typer   disable_root_disk_serialr   network_purchase_typer   r(   r+   r)   r   rt   r   r   r   r   r   r   sD                                                                       r   create_instance_by_spec!BccClient.create_instance_by_spec  si   r "$9$;F=!$0F=!?9G''

  1$';D#$!-*@D&'&KZ$[?ZZ%8%8?$[D!#q(,DD()&DOA$2D!DL'D&$3D!".+BD'(! $ 7 7 I I 9*FW X 1D (D (D(&7D"#'30LD,-)'9D#$(41ND-.a$3D!'(/D$%(<D$%&Tc%dTc.n&=&=Tc%dD!"'&6D"# (D%#1D  (D (D" +D+)=D%&"DM#".D%#1D #!-D045H5#DL)'9D#$(&7D"#"!,D$DN-^ (D$DN&$3D!*)<D%&#".D#!-D (D*(;D$%*(;D$%#HTU 4 4U"2D#/,DD()#".D ,*?D&'*%8D!"!!,"3"3T4::d;K)/ " @ 	@O %\L &e0 6<  Vs   J*,J/'J48J9c                     SS0nUc  [        5       US'   OX5S'   [        R                  " U5      nSU-  nSU0nU R                  [        R
                  U[        R                  " U5      XTS9$ )a  
    set instance auto release.

:param instance_id:
    The id of instance.
:type instance_id: string

:param release_time:
    The new value for instance's name.
:type release_time: string in format yyyy-MM-dd'T'HH:mm:ss'Z'.

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:return:
:rtype baidubce.bce_response.BceResponse
autoreleaseNr7   r   releaseTimer)   r+   r   rp   r   r   r-   r	   r   rv   rw   )r   r   release_timer   r   r+   r(   r)   s           r   auto_release_instanceBccClient.auto_release_instance&  s    4 4
 $9$;F=!$0=!--k:,<
 !!,"2"2Dtzz$?OX^!nnr   c                 
   0 nUc  [        5       US'   OXhS'   [        R                  " U5      nSU-  n	0 n
Ub  X*S'   Ub  X:S'   Ub  XJS'   Ub  XZS'   U R                  [        R
                  U	[        R                  " U
5      XS9$ )a  
Releasing the instance owned by the user.
Only the Postpaid instance or Prepaid which is expired can be released.
After releasing the instance,
all of the data will be deleted.
all of volumes attached will be auto detached, but the volume snapshots will be saved.
all of snapshots created from original instance system disk will be deleted,
all of customized images created from original instance system disk will be reserved.

:param instance_id:
    The id of instance.
:type instance_id: string

:param related_release_flag:
    Release or not related resources.
:type related_release_flag: bool

:param delete_cds_snapshot_flag:
    Delete or not cds snapshot.
:type delete_cds_snapshot_flag: bool

:param delete_related_enis_flag:
    Delete or not related enis.
:type delete_related_enis_flag: bool

:param bcc_recycle_flag:
    Recycle or not bcc instance.
:type bcc_recycle_flag: bool

:return:
:rtype baidubce.bce_response.BceResponse
r7   r   relatedReleaseFlagdeleteCdsSnapshotFlagdeleteRelatedEnisFlagbccRecycleFlagr  )rp   r   r   r-   r	   ru   rv   rw   )r   r   related_release_flagdelete_cds_snapshot_flagdelete_related_enis_flagbcc_recycle_flagr   r   r+   r(   r)   s              r   'release_instance_with_related_resources1BccClient.release_instance_with_related_resourcesN  s    H $9$;F=!$0=!--k:,+)=%&#/,D()#/,D()'%5!"!!,"3"3T

4@PY_!oor   c                     0 nUc  [        5       US'   OXWS'   Sn0 n	XS'   Ub  X)S'   Ub  X9S'   Ub  XIS'   U R                  [        R                  U[        R
                  " U	5      XvS9$ )a]  
Releasing the instance owned by the user.
Only the Prepaid instance and the instance has not expired can be released.
After releasing the instance,
all of the data will be deleted.
all of volumes attached will be auto detached, but the volume snapshots will be saved.
all of snapshots created from original instance system disk will be deleted,
all of customized images created from original instance system disk will be reserved.

:param instance_id:
    The id of instance.
:type instance_id: string

:param related_release_flag:
    Release or not related resources.
:type related_release_flag: bool

:param delete_cds_snapshot_flag:
    Delete or not cds snapshot.
:type delete_cds_snapshot_flag: bool

:param delete_related_enis_flag:
    Delete or not related enis.
:type delete_related_enis_flag: bool

:return:
:rtype baidubce.bce_response.BceResponse
r7   s   /instance/deleter   r  r  r  r  r   )
r   r   r  r  r  r   r   r+   r(   r)   s
             r   /release_prepaid_instance_with_related_resources9BccClient.release_prepaid_instance_with_related_resources  s    @ $9$;F=!$0=!"(\+)=%&#/,D()#/,D()!!,"3"3T

4@PY_!oor   c                     UR                  SS9nSU-  nSS0nU(       a  X%S'   U R                  [        R                  XEUS9$ )r   r   r   r   isDeploySetTr   rn   r   r   s         r   get_instance_with_deploy_set&BccClient.get_instance_with_deploy_set  sZ      "(('(:,4
 '6#$!!,"2"2DPV!WWr   c                     UR                  SS9nSU-  nSS0nU(       a  X%S'   U R                  [        R                  XEUS9$ )r   r   r   r   r   Nrn   r   r   s         r   'get_instance_with_deploy_set_and_failed1BccClient.get_instance_with_deploy_set_and_failed  sZ      "(('(:,d
 '6#$!!,"2"2DPV!WWr   )r   r@   c                     SS0nUc  [        5       US'   OXWS'   [        R                  " U5      nSU-  nSU0n	Ub  X9S'   Ub  XIS'   U R                  [        R
                  U[        R                  " U	5      XvS9$ )	a  
modify instance hostname

:param instance_id:
    The id of instance.
:type instance_id: string

:param hostname:
    new hostname
:type hostname: string, FORMAT ^([a-z]+)((\.|-)?[a-z0-9]+)*$

:param reboot:
    Auto reboot the instance after hostname changed.
:type reboot: bool

:param is_open_hostname_domain:
    Set hostname domain opening
:type is_open_hostname_domain: bool

:return:
:rtype baidubce.bce_response.BceResponse
changeHostnameNr7   r   r@   r   rB   r  r  )
r   r   r@   r   r   r   r   r+   r(   r)   s
             r   modify_instance_hostname"BccClient.modify_instance_hostname  s    4 d
 $9$;F=!$0=!--k:,
 #N".+B'(!!,"2"2Dtzz$?OX^!nnr   )r  c                     0 nUc  [        5       US'   OX$S'   Sn/ nU H  nUR                  SU05        M     SU0nU R                  [        R                  U[
        R                  " U5      XCS9$ )z
Recovery multi instances

:param instance_id_list:
    The id list of instances to recovery.
:type instance_id_list: list of string

:return:
:rtype baidubce.bce_response.BceResponse
r7   s   /instance/recoveryr   r   r  )rp   appendr-   r	   ru   rv   rw   )	r   r  r   r   r+   r(   list_of_itemr   r)   s	            r   recovery_instancesBccClient.recovery_instances  s     $9$;F=!$0=!$+K{ ;< , <
 !!,"3"3T

4@PY_!oor   c                     0 nUc  [        5       US'   OXWS'   SnSU0n	Ub  X)S'   Ub  X9S'   Ub  XIS'   U R                  [        R                  U[        R
                  " U	5      XvS9$ )au  
Releasing the instance owned by the user.
Only the Prepaid instance and the instance has not expired can be released.
After releasing the instance, all of the data will be deleted.

:param instance_ids:
     The id list of instances.
:type instance_ids: list of string


:param related_release_flag:
    Release or not related resources.
:type related_release_flag: bool

:param delete_cds_snapshot_flag:
    Delete or not cds snapshot.
:type delete_cds_snapshot_flag: bool

:param delete_related_enis_flag:
    Delete or not related enis.
:type delete_related_enis_flag: bool

:return:
:rtype baidubce.bce_response.BceResponse
r7   s   /instance/batchRefundResourcer   r  r  r  r  r   )
r   r   r  r  r  r   r   r+   r(   r)   s
             r   batch_refund_resources BccClient.batch_refund_resources/  s    : $9$;F=!$0=!/<
  +)=%&#/,D()#/,D()!!,"3"3T

4@PY_!oor   )rx   r2   memory_cap_in_gbc                    Sn0 nUc  [        5       US'   OUUS'   UUUS.nUb  UUS'   US:w  a  UUS'   Ub  UUS'   Ub   U Vs/ s H  nUR                  PM     snUS'   US:  a  UUS	'   Ub  UUS
'   U	b1  U R                  R                  R                  n[        U	U5      nUUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   U
b  U
US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub!  U Vs/ s H  nUR                  PM     nnUUS'   Ub  UUS'   U R                  [        R                  U[        R                  " U5      UUS9$ s  snf s  snf )a,  
Query bid instance price in market.

:param instance_type:
    The specified Specification to create the instance,
    See more detail on
    https://cloud.baidu.com/doc/BCC/API.html#InstanceType
:type instance_type: string

:param cpu_count:
    The parameter to specified the cpu core to create the instance.
:type cpu_count: int

:param memory_cap_in_gb:
    The parameter to specified the capacity of memory in GB to create the instance.
:type memory_cap_in_gb: int

:param image_id:
    The id of image, list all available image in BccClient.list_images.
:type image_id: string

:param create_cds_list:
    The optional list of volume detail info to create.
:type create_cds_list: list<bcc_model.CreateCdsModel>

:param network_cap_in_mbps:
    The optional parameter to specify the bandwidth in Mbps for the new instance.
    It must among 0 and 200, default value is 0.
    If it's specified to 0, it will get the internal ip address only.
:type network_cap_in_mbps: int

:param purchase_count:
    The number of instance to buy, the default value is 1.
:type purchase_count: int

:param name:
    The optional parameter to desc the instance that will be created.
:type name: string

:param admin_pass:
    The optional parameter to specify the password for the instance.
    If specify the adminPass,the adminPass must be a 8-16 characters String
    which must contains letters, numbers and symbols.
    The symbols only contains "!@#$%^*()".
    The adminPass will be encrypted in AES-128 algorithm
    with the substring of the former 16 characters of user SecretKey.
    If not specify the adminPass, it will be specified by an random string.
    See more detail on
    https://bce.baidu.com/doc/BCC/API.html#.7A.E6.31.D8.94.C1.A1.C2.1A.8D.92.ED.7F.60.7D.AF
:type admin_pass: string

:param zone_name:
    The optional parameter to specify the available zone for the instance.
    See more detail through list_zones method
:type zone_name: string

:param subnet_id:
    The optional parameter to specify the id of subnet from vpc, optional param
     default value is default subnet from default vpc
:type subnet_id: string

:param security_group_id:
    The optional parameter to specify the securityGroupId of the instance
    vpcId of the securityGroupId must be the same as the vpcId of subnetId
    See more detail through listSecurityGroups method
:type security_group_id: string

:param client_token:
    An ASCII string whose length is less than 64.
    The request will be idempotent if client token is provided.
    If the clientToken is not specified by the user,
    a random String generated by default algorithm will be used.
    See more detail at
    https://bce.baidu.com/doc/BCC/API.html#.E5.B9.82.E7.AD.89.E6.80.A7
:type client_token: string

:param root_disk_size_in_gb:
    The parameter to specify the root disk size in GB.
    The root disk excludes the system disk, available is 40-500GB.
:type root_disk_size_in_gb: int

:param root_disk_storage_type:
    The parameter to specify the root disk storage type.
    Default use of HP1 cloud disk.
:type root_disk_storage_type: string

:param relation_tag
    Set whether the tags specified by the instance to ne queried needs
    to be associated with an existing tag key.
    The default value is false, this param is optional.
:type relation_tag: bool

:param tags
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:param bid_model
    The parameter to specify the bidding model.
    The bidding model can be "market" or "custom".
:type bid_model: string

:param bid_price
    The parameter to specify the bidding price.
    When the bid_model is "custom", it works.
:type bid_price: string

:param key_pair_id
    The parameter to specify id of the keypair.
:type key_pair_id: string

:param asp_id
    The parameter to specify id of the asp.
:type asp_id: string

:param internet_charge_type
    The parameter to specify the internet charge type.
    See more detail on
    https://cloud.baidu.com/doc/BCC/API.html#InternetChargeType
:type internet_charge_type: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/bidPricer7   )r:   r;   rI   r<   r   rJ   rK   rL   rN   rO   rP   rQ   rR   rS   rd   re   rf   rg   rh   rC   rj   rM   rn   )rp   rr   r   rs   rt   r   r-   r	   ru   rv   rw   ) r   rx   r2   r  rz   r{   ry   r   rO   r   r   r   r4   r   r   network_cap_in_mbpsr   rj   r   r   r   r   r   r   r(   r+   r)   r   rt   r   r   r   s                                    r   get_bid_instance_price BccClient.get_bid_instance_price]  s   D %$9$;F=!$0F=! ""2)

 &DO1$';D#$!-*@D&'&KZ$[?ZZ%8%8?$[D!A$2D!DL! $ 7 7 I I 9*FW X 1D (D (D(&7D"# (D (D" +D+)=D%&"DM#".D045H5#DL*,?D()!!,"3"3T4::d;KTZci!jjC %\8 6s   E5Ec                 r    0 nUc  [        5       US'   OXS'   SnU R                  [        R                  XCUS9$ )zI
Get all bid flavors.

:return:
:rtype baidubce.bce_response.BceResponse
r7   s   /instance/bidFlavorrn   )rp   r-   r	   ru   )r   r   r   r+   r(   s        r   list_bid_flavorBccClient.list_bid_flavor  sH     $9$;F=!$0=!%!!,"3"3TQW!XXr   )r   r   c                     0 nUc  [        5       US'   OX5S'   UR                  SS9nSU-  nSU0nU R                  [        R                  U[
        R                  " U5      XTS9$ )a  
Set instance deleion protection.

:param instance_id
    The id of instance.
:type instance_id: string

:param deletion_protection
    The status of instance deletion protection. 1:enable, 0:disable.
:type deletion_protection: int

:return:
:rtype baidubce.bce_response.BceResponse
r7   r   r   s   /instance/%s/deletionProtectionrH   rn   rp   r   r-   r	   r   rv   rw   )r   r   r   r   r   r+   r(   r)   s           r   modify_deletion_protection$BccClient.modify_deletion_protection$  sz      $9$;F=!$0=!!(('(:1K? "5
 !!,"2"2D$**T:JSY!iir   )r   r   c                     0 nUc  [        5       US'   OX5S'   UR                  SS9nSU-  nSU0nU R                  [        R                  U[
        R                  " U5      XTS9$ )aN  
Set bid instance eip_auto_related_delete.

:param instance_id
    The id of instance.
:type instance_id: string

:param is_eip_auto_related_delete
    Enables the deletion of the related EIP of bid instance when the instance is being deleted.
:type is_eip_auto_related_delete: bool

:return:
:rtype baidubce.bce_response.BceResponse
r7   r   r   s&   /instance/%s/modifyRelatedDeletePolicyr   rn   r  )r   r   r   r   r   r+   r(   r)   s           r   modify_related_delete_policy&BccClient.modify_related_delete_policy@  sz      $9$;F=!$0=!!(('(:8;F$&@
 !!,"2"2D$**T:JSY!iir   c                     0 nUc  [        5       US'   OXWS'   UR                  SS9nSU-  n0 n	Ub  X)S'   Ub  X9S'   Ub  XIS'   U R                  [        R                  U[
        R                  " U	5      XvS9$ )	a  
Releasing the specified volume owned by the user.
You can release the specified volume only
when the instance is among state of  Available/Expired/Error,
otherwise, it's will get 409 errorCode.

:param volume_id:
    The id of the volume which will be released.
:type volume_id: string

:param auto_snapshot:
    Snapshot volume automatically. value: 'on'/'off'. Default value: 'off'.
:type auto_snapshot: string

:param manual_snapshot:
    Snapshot volume manually. value: 'on'/'off'. Default value: 'off'.
:type manual_snapshot: string

:param recycle:
    where recycle volume or not, value: 'on'/'off'. Default value: 'on'.
:type recycle: string

:return:
:rtype baidubce.bce_response.BceResponse
r7   r   r   r  autoSnapshotmanualSnapshotrecycler  )rp   r   r-   r	   ru   rv   rw   )
r   r  auto_snapshotmanual_snapshotr  r   r   r+   r(   r)   s
             r   release_volume_newBccClient.release_volume_new\  s    8 $9$;F=!$0=!$$g$6	y($#0 &%4!"%O!!,"3"3T

4@PY_!oor   )r  r  r  c                     0 nUc  [        5       US'   OXFS'   SnUUUS.nU R                  [        R                  U[        R
                  " U5      XeS9$ )a  
set auto_renew_cds_volume

:param volume_id:
    The id of the volume which will be renewed.
:type volume_id: string

:param renew_time:
    Auto renew start time.
    Value:
        - month: 1 ~ 9
        - year: 1 ~ 3
:type renew_time: string

:param renew_time_unit:
    Choose automatic monthly or annual renewals. value: 'month'/'year'
:type renew_time_unit: string

:return:
:rtype baidubce.bce_response.BceResponse
r7   s   /volume/autoRenew)r  r  r  r  r   )	r   r  r  r  r   r   r+   r(   r)   s	            r   auto_renew_cds_volumeBccClient.auto_renew_cds_volume  se    . $9$;F=!$0=!#!#,
 !!,"3"3T

4@PY_!oor   c                     SnSU0n0 nUc  [        5       US'   OX&S'   U R                  [        R                  U[        R
                  " U5      XcS9$ )z
cancel_auto_renew_volume_cluster

:param volume_id:
    The id of the volume which will be renewed.
:type volume_id: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /volume/cancelAutoRenewr  r7   rn   r   )r   r  r   r   r(   r)   r+   s          r   cancel_auto_renew_cds_volume&BccClient.cancel_auto_renew_cds_volume  si     *	
 $9$;F=!$0=!!!,"3"3T4::d;K)/ " @ 	@r   )r   c                 v    SnSU0nUc  [        5       US'   OX%S'   U R                  [        R                  XEUS9$ )z
get_available_disk_info

:param zone_name:
    The name of available zone for volume to use.
:type zone_name: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /volume/diskrQ   r7   rn   rp   r-   r	   r   r   r   r   r   r(   r+   s         r   get_available_disk_info!BccClient.get_available_disk_info  sQ     	
 $9$;F=!$0=!!!,"2"2DPV!WWr   c                 $   SS0nUc  [        5       US'   OXFS'   UR                  SS9nSU-  n0 nUb  X(S'   Ub  U V	s/ s H  oR                  PM     n
n	XS'   U R                  [        R
                  U[        R                  " U5      XeS	9$ s  sn	f )
a   
bind tags to volume

:param volume_id:
    The id of the volume which will be renewed.
:type volume_id: string

:param tags
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:return:
:rtype baidubce.bce_response.BceResponse
r0  Nr7   r   r      /volume/%s/tagrC   r=  rn   rp   r   rr   r-   r	   r   rv   rw   r   r  r   rj   r   r   r+   r(   r)   r   r   s              r   
tag_volumeBccClient.tag_volume  s    " D
 $9$;F=!$0=!$$g$6	 9,#".045H5!)!!,"2"2D$**T:JSY!ii 6   Bc                 $   SS0nUc  [        5       US'   OXFS'   UR                  SS9nSU-  n0 nUb  X(S'   Ub  U V	s/ s H  oR                  PM     n
n	XS'   U R                  [        R
                  U[        R                  " U5      XeS	9$ s  sn	f )
a  
unbind tags to volume

:param volume_id:
    The id of the volume which will be renewed.
:type volume_id: string

:param tags
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:return:
:rtype baidubce.bce_response.BceResponse
r5  Nr7   r   r   r0  rC   r=  rn   r1  r2  s              r   untag_volumeBccClient.untag_volume  s    " d
 $9$;F=!$0=!$$g$6	 9,#".045H5!)!!,"2"2D$**T:JSY!ii 6r5  c                     SnSU0n	Uc  [        5       U	S'   OXiS'   Ub  X)S'   Ub  X9S'   Ub  XIS'   Ub  XYS'   U R                  [        R                  XUS9$ )	a  
list_snapshot_chain

:param volume_id:
    The id of the volume which will be renewed.
:type volume_id: string

:param order
    The response list order. Value: asc/desc
:type order: string

:param order_by
    The response list order. Value: chainId(default)/chainSize/volumeSize
:type order_by: string

:param page_no
    page number. default value = 1
:type page_no: int

:param page_size
    page size. default value  = 1000
:type page_size: int

:return:
:rtype baidubce.bce_response.BceResponse
s   /snapshot/chainr  r7   orderorderBypageNopageSizern   r+  )
r   r  r:  order_bypage_no	page_sizer   r   r(   r+   s
             r   list_snapshot_chainBccClient.list_snapshot_chain   s    : "	
 $9$;F=!$0=!#7O (9&8 !*:!!,"2"2DPV!WWr   )chain_idc                    SS0nUc  [        5       US'   OX5S'   UR                  SS9nSU-  n0 nUb  U Vs/ s H  oR                  PM     n	nXS'   U R                  [        R
                  U[        R                  " U5      XTS9$ s  snf )	a  
bind tags to snapshot chain

:param chain_id:
    The id of the volume which will be renewed.
:type chain_id: string

:param tags
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:return:
:rtype baidubce.bce_response.BceResponse
r0  Nr7   r   r      /snapshot/chain/%s/tagr=  rn   r1  
r   rC  rj   r   r   r+   r(   r)   r   r   s
             r   tag_snapshot_chainBccClient.tag_snapshot_chainP  s    " D
 $9$;F=!$0=!??G?4(83045H5!)!!,"2"2D$**T:JSY!ii 6   Bc                    SS0nUc  [        5       US'   OX5S'   UR                  SS9nSU-  n0 nUb  U Vs/ s H  oR                  PM     n	nXS'   U R                  [        R
                  U[        R                  " U5      XTS9$ s  snf )	a  
unbind tags to snapshot chain

:param chain_id:
    The id of the volume which will be renewed.
:type chain_id: string

:param tags
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:return:
:rtype baidubce.bce_response.BceResponse
r5  Nr7   r   r   rE  r=  rn   r1  rF  s
             r   untag_snapshot_chainBccClient.untag_snapshot_chainp  s    " d
 $9$;F=!$0=!??G?4(83045H5!)!!,"2"2D$**T:JSY!ii 6rI  c                     Sn0 n	Uc  [        5       U	S'   OXiS'   0 n
Ub  XS'   Ub  X*S'   Ub  X:S'   Ub  XJS'   Ub  XZS'   U R                  [        R                  U[        R
                  " U
5      XS9$ )	aW  
update asp
Attention: Param name and asp_id can not both be none.

:param name:
    The name of the asp.
:type name: string

:param asp_id:
    Identify of asp.
:type asp_id: string

:param time_points:
    Daily triggering time(hour of day, 0 ~ 23) of snapshot policy. e.g. [0, 6, 12, 18].
:type time_points: list

:param repeat_week_days:
    Weekly triggering time(day of week, 0 ~ 6, 0 means Sunday) of snapshot policy. e.g. [1, 3]
:type repeat_week_days: list

:param retention_days:
    Retention days of snapshot.
:type retention_days: int

:return:
:rtype baidubce.bce_response.BceResponse
s   /asp/updater7   rO   rh   rY  rZ  r[  rn   rp   r-   r	   r   rv   rw   )r   rO   r   rT  rU  rV  r   r   r(   r+   r)   s              r   
update_aspBccClient.update_asp  s    : $9$;F=!$0=!L"M"!,'%5!"%$2!!!,"2"2D$**T:J)/ " @ 	@r   c	                     Sn	0 n
Uc  [        5       U
S'   OXzS'   0 nUb  XS'   Ub  X+S'   Ub  X;S'   Ub  XKS'   Ub  X[S'   Ub  XkS'   U R                  [        R                  U	[        R
                  " U5      XS	9$ )
aI  
Get price of instance flover by spec.
Attention: Param spec_id and spec can not both be none.

:param spec_id:
    Identify of the spec.
:type spec_id: string

:param spec:
    The name of spec.
:type spec: string

:param payment_timing:
    Payment timing of instance, prepay or postpay.
:type payment_timing: string

:param zone_name:
    Name of available zone.
:type zone_name: string

:param purchase_num:
    Number of purchase.
:type purchase_num: int

:param purchase_length:
    Reservation time.
:type purchase_length: int

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/pricer7   r   r>   r   rQ   rN   purchaseLengthrn   r   )r   r   r>   r   r   purchase_numpurchase_lengthr   r   r(   r+   r)   s               r   get_price_by_specBccClient.get_price_by_spec  s    B "$9$;F=!$0=!$NL%$2! (#$0!&%4!"!!,"3"3T4::d;K)/ " @ 	@r   c                     Sn0 nUc  [        5       US'   OXXS'   Ub  XS'   Ub  X(S'   Ub  X8S'   Ub  XHS'   U R                  [        R                  USXS9$ )	a  
list the logicalZone from the bcc package specification.

:param spec_id:
    Identify of the spec.
:type spec_id: string

:param spec:
    The name of spec.
:type spec: string

:param product_type:
    Payment timing of instance, prepay or postpay.
:type product_type: string

:param instance_type:
    The specified Specification to create the instance,
    See more detail on
    https://cloud.baidu.com/doc/BCC/API.html#InstanceType
:type instance_type: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/flavorZonesr7   r   r>   productTyperI   s   /v1)r#   r+   r   r+  )	r   r   r>   product_typerx   r   r   r(   r+   s	            r   list_type_zonesBccClient.list_type_zones  s    4 ($9$;F=!$0=!&8!6N#$0=!$%2>"!!,"2"2DPV!ffr   c	                     Sn	0 n
Uc  [        5       U
S'   OXzS'   0 nUb  XS'   Ub  X+S'   Ub  X;S'   Ub  XKS'   Ub  X[S'   Ub  XkS'   U R                  [        R                  U	[        R
                  " U5      XS	9$ )
a  
Change instance subnet by id.

:param instance_id:
    Identify of the instance.
:type instance_id: string

:param subnet_id:
    New subnet id.
:type subnet_id: string

:param internal_ip:
    Ip address of internal network.
:type internal_ip: string

:param reboot:
Reboot instance or not. Default value is False.
:type reboot: bool

:param security_group_ids:
:type security_group_ids: list<string>

:param enterprise_security_group_ids:
:type enterprise_security_group_ids: list<string>

:return:
:rtype baidubce.bce_response.BceResponse
s   /subnet/changeSubnetr7   r   rR   r   r   rU   rV   r  rN  r   r   r   r   r   r   r   r   r   r(   r+   r)   s               r   instance_change_subnet BccClient.instance_change_subnet'  s    @ '$9$;F=!$0=!"!, ("!,#N)'9#$(41N-.!!,"2"2Dtzz$?OX^!nnr   c	                     Sn	0 n
Uc  [        5       U
S'   OXzS'   0 nUb  XS'   Ub  X+S'   Ub  X;S'   Ub  XKS'   Ub  X[S'   Ub  XkS'   U R                  [        R                  U	[        R
                  " U5      XS	9$ )
a  
Change instance vpc by id.

:param instance_id:
    Identify of the instance.
:type instance_id: string

:param subnet_id:
    New subnet id.
:type subnet_id: string

:param internal_ip:
    Ip address of internal network.
:type internal_ip: string

:param reboot:
Reboot instance or not. Default value is False.
:type reboot: bool

:return:
:rtype baidubce.bce_response.BceResponse
s   /vpc/changeVpcr7   r   rR   r   r   rU   rV   r  rN  r]  s               r   instance_change_vpcBccClient.instance_change_vpc`  s    2 !$9$;F=!$0=!"!, ("!,#N)'9#$(41N-.!!,"2"2Dtzz$?OX^!nnr   c                     UR                  SS9nSU-  n0 nUc  [        5       US'   OX%S'   U R                  [        R                  XEUS9$ )z
Change instance vpc by id.

:param instance_id:
    Identify of the instance.
:type instance_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r   r   s   /eni/%sr7   rn   r   rp   r-   r	   r   )r   r   r   r   r(   r+   s         r   list_instance_enisBccClient.list_instance_enis  s`     "(('(:K'$9$;F=!$0=!!!,"2"2DPV!WWr   c                     Sn0 nUc  [        5       US'   OX%S'   Ub  XS'   U R                  [        R                  XEUS9$ )z
Change instance vpc by id.

:param zone_name:
    Available zone name
:type zone_name: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/flavorSpecr7   rQ   rn   r+  r,  s         r   list_flavor_specBccClient.list_flavor_spec  sV     '$9$;F=!$0=! !*:!!,"2"2DPV!WWr   c                     UR                  SS9nSU-  nSS0nUc  [        5       US'   OXGS'   SU0nUb  X8S'   U R                  [        R                  U[
        R                  " U5      XuS	9$ )
a  
Resize instance by spec.

:param instance_id:
    Identify of the instance.
:type instance_id: string

:param spec:
    The name of spec.
:type spec: string

:param enable_jumbo_frame:
    The parameter of specified the instance enable/disable jumbo frame.
    True means enable jumbo frame, false means disable jumbo frame.
    enable_jumbo_frame default None which means:
    When you change to the spec which doesn't support jumbo frame, the jumbo frame will be disabled.
    When the original instance don't support jumbo frame and you change to the spec which support jumbo frame,
    the jumbo frame will be disabled.
    When the original spec of the instance support jumbo frame , then you change to the spec which support jumbo
    frame, if the original instance enable jumbo frame, the jumbo frame will be enabled, if the original instance
    disable jumbo frame, the jumbo frame will be disabled.
:type enable_jumbo_frame: bool

:return:
:rtype baidubce.bce_response.BceResponse
r   r   s   /instanceBySpec/%sr(  Nr7   r>   r  r  r   rp   r-   r	   r   rv   rw   )	r   r   r>   r  r   r   r(   r+   r)   s	            r   resize_instance_by_spec!BccClient.resize_instance_by_spec  s    6 "(('(:${2d
 $9$;F=!$0=!D
 )'9#$!!,"2"2Dtzz$?OX^!nnr   c                    Sn0 nUc  [        5       US'   OXXS'   UUS.n	Ub/  U R                  R                  R                  n
[	        X*5      nXS'   Ub  XIS'   U R                  [        R                  U[        R                  " U	5      XS9$ )a  
Batch rebuild instances.

:param image_id:
    Image id for rebuild.
:type image_id: string

:param admin_pass:
    The password of admin.
:type admin_pass: string

:param instance_ids:
    Identify list of instances need to rebuild.
:type instance_ids: list of string

:param keypair_id:
    Set the id of the keypair to be bound. (optional param)
:type keypair_id: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/rebuildr7   )r<   r   rP   rf   r  )
rp   r   rs   rt   r   r-   r	   r   rv   rw   )r   r4   r   r   r  r   r   r(   r+   r)   rt   r   s               r   batch_rebuild_instances!BccClient.batch_rebuild_instances  s    0 $$9$;F=!$0=!'
 ! $ 7 7 I I 9* X 1! *!!,"2"2Dtzz$?OX^!nnr   c                     UR                  SS9nSU-  nSS0n	Uc  [        5       U	S'   OXiS'   SU0n
Ub  XJS'   XZS	'   Ub  X:S
'   U R                  [        R                  U[
        R                  " U
5      XS9$ )a  
Change instance pay timing to prepaid.

:param instance_id:
    Identify of the instance to change
:type instance_id: string

:param duration:
    Set the duration time of prepayment, unit:month.
:type duration: int

:param relation_cds:
    Set whether to chagne the associated data disk. True - change; False - no change. Default is False.
:type relation_cds: bool

:param auto_renew:
    Whether to enable automatic renewal, defaults to False.
:type auto_renew: bool


:param auto_renew_period:
    Duration of each automatic renewal(Unit: months).
    Value range: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36. If not specified, the default is 1.
    This parameter is effective only when auto_renew is set to true.
:type auto_renew_period: int

:return:
:rtype baidubce.bce_response.BceResponse
r   r   r   toPrepayNr7   durationr   autoRenewPeriodrelationCdsr  )r   rp   r-   r	   ru   rv   rw   )r   r   rs  relation_cdsr   auto_renew_periodr   r   r(   r+   r)   s              r   change_to_prepaidBccClient.change_to_prepaid  s    > "(('(:,
 $9$;F=!$0=!
 ! *&7"##".!!,"3"3T

4@PY_!oor   c                     Sn0 n	Uc  [        5       U	S'   OXiS'   Ub  XS'   Ub  X)S'   Ub  X9S'   Ub  XIS'   Ub  XYS'   U R                  [        R                  XUS9$ )	an  
Return a list of no charge instances owned by the authenticated user.

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

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

:param internal_ip:
    The identified internal ip of instance.
:type internal_ip: string

:param keypair_id:
    get instance list filtered by keypair
:type keypair_id: string

:param zone_name:
    get instance list filtered by name of available zone
:type zone_name: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/noCharger7   r   r   r   rf   rQ   rn   r+  )
r   r   r   r   r  r   r   r   r(   r+   s
             r   list_instance_no_charge!BccClient.list_instance_no_chargeD  s    @ %$9$;F=!$0=!%8 (9"#.< !",; !*:!!,"2"2DPV!WWr   c                     Sn0 nUc  [        5       US'   OX%S'   SU0nU R                  [        R                  U[        R
                  " U5      XSS9$ )z
Cancel a bid order

:param order_id:
    Identify of the order to cancel
:type order_id: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/cancelBidOrderr7   orderIdr  r   )r   order_idr   r   r(   r+   r)   s          r   cancel_bid_orderBccClient.cancel_bid_orderv  sa     +$9$;F=!$0=!x
 !!,"3"3T

4@PY_!oor   c                     Sn0 n	Uc  [        5       U	S'   OXiS'   UUUS.n
Ub  XJS'   Ub  XZS'   U R                  [        R                  U[        R
                  " U
5      XS9$ )a$  
create auto renew rules for instance

:param instance_id:
    Identify of the instance to auto renew
:type instance_id: string

:param renew_time_unit:
    Time unit for renew, values: 'month'/'year', default value: month
:type renew_time_unit: string

:param renew_time:
    renew time of year, values: 1/2/3, default value: 1
:type renew_time: int
:param renew_cds:
    renew cds, values: True/False, default value: True
:param renew_eip:
    renew eip, values: True/False, default value: True

:return:
:rtype baidubce.bce_response.BceResponse
s#   /instance/batchCreateAutoRenewRulesr7   )r   r  r  renewCdsrenewEipr  r   )r   r   r  r  	renew_cds	renew_eipr   r   r(   r+   r)   s              r   batch_create_auto_renew_rules'BccClient.batch_create_auto_renew_rules  s    0 6$9$;F=!$0=!%,#

  ( (!!,"3"3T

4@PY_!oor   c                     Sn0 nUc  [        5       US'   OXGS'   SU0nUb  X(S'   Ub  X8S'   U R                  [        R                  U[        R
                  " U5      XuS9$ )aD  
delete auto renew rules for instance

:param instance_id:
    Identify of the instance to auto renew
:type instance_id: string
:param renew_cds:
    renew cds, values: True/False, default value: True
:param renew_eip:
    renew eip, values: True/False, default value: True
:return:
:rtype baidubce.bce_response.BceResponse
s#   /instance/batchDeleteAutoRenewRulesr7   r   r  r  r  r   )	r   r   r  r  r   r   r(   r+   r)   s	            r   batch_delete_auto_renew_rules'BccClient.batch_delete_auto_renew_rules  s}     6$9$;F=!$0=!+
  ( (!!,"3"3T

4@PY_!oor   c                     UR                  SS9nSU-  n0 nUc  [        5       US'   OX%S'   0 nU R                  [        R                  U[
        R                  " U5      XSS9$ )z
delete auto renew rules for instance

:param instance_id:
    Identify of the instance to delete
:type instance_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r   r   s   /recycle/instance/%sr7   r  )r   rp   r-   r	   r  rv   rw   r   r   r   r   r(   r+   r)   s          r   delete_recycled_instance"BccClient.delete_recycled_instance  sp     "(('(:&4$9$;F=!$0=!!!,"5"5t$**TBR[a!qqr   c                     Sn0 nUc  [        5       US'   OXGS'   Ub  X'S'   Ub  X7S'   SU0nU R                  [        R                  U[        R
                  " U5      XuS9$ )a  
list instances by id list

:param instance_ids:
    Identify of the instances to return info
:type instance_ids: list of string

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

:param max_keys:
    The optional parameter to specifies the max number of list result to return.
    The default value is 1000.
:type max_keys: int
:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/listByInstanceIdr7   r   r   r   r  r   )	r   r   r   r   r   r   r(   r+   r)   s	            r   list_instance_by_instance_ids'BccClient.list_instance_by_instance_ids  s}    , -$9$;F=!$0=!%8 (9<
 !!,"3"3T

4@PY_!oor   c                     Sn0 nUc  [        5       US'   OX%S'   SU0nU R                  [        R                  U[        R
                  " U5      XSS9$ )z
get instances delete progress

:param instance_ids:
    Identify of the instances to return info
:type instance_ids: list of string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/deleteProgressr7   r   r  r   r   r   r   r   r(   r+   r)   s          r   get_instance_delete_progress&BccClient.get_instance_delete_progress  sa     +$9$;F=!$0=!<
 !!,"3"3T

4@PY_!oor   c                     Sn0 n	Uc  [        5       U	S'   OXiS'   SU0n
Ub  X*S'   Ub  X:S'   Ub  XJS'   Ub  XZS'   U R                  [        R                  U[        R
                  " U
5      XS9$ )	aR  
batch delete instance with related resource

:param instance_ids:
    Identify of the instances to return info
:type instance_ids: list of string

:param related_release_flag:
    Release or not related resources.
:type related_release_flag: bool

:param delete_cds_snapshot_flag:
    Delete or not cds snapshot.
:type delete_cds_snapshot_flag: bool

:param delete_related_enis_flag:
    Delete or not related enis.
:type delete_related_enis_flag: bool

:param bcc_recycle_flag:
    Recycle or not bcc instance.
:type bcc_recycle_flag: bool


:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/batchDeleter7   r   r  r  r  r  r  r   )r   r   r  r  r  r  r   r   r(   r+   r)   s              r   +batch_delete_instance_with_related_resource5BccClient.batch_delete_instance_with_related_resource&  s    < ($9$;F=!$0=!<
  +)=%&#/,D()#/,D()'%5!"!!,"3"3T

4@PY_!oor   c                     SnSS0nUc  [        5       US'   OX%S'   SU0nU R                  [        R                  U[        R
                  " U5      XSS9$ )z
batch start instance

:param instance_ids:
    Identify of the instances to return info
:type instance_ids: list of string

:return:
:rtype baidubce.bce_response.BceResponse
   /instance/batchActionr   Nr7   r   r  rN  r  s          r   batch_start_instanceBccClient.batch_start_instanceW  sj     (T
 $9$;F=!$0=!<
 !!,"2"2Dtzz$?OX^!nnr   c                     SnSS0nUc  [        5       US'   OXGS'   SU0nUb  X(S'   Ub  X8S'   U R                  [        R                  U[        R
                  " U5      XuS9$ )	aQ  
batch stop instance

:param instance_ids:
    Identify of the instances to return info
:type instance_ids: list of string

:param force_stop:
    force stop instance
:type force_stop: bool

:param stop_with_no_charge:
    stop instance and stop billing
:type stop_with_no_charge: bool

:return:
:rtype baidubce.bce_response.BceResponse
r  r   Nr7   r   r   r   r  rN  )	r   r   r   stop_with_no_charger   r   r(   r+   r)   s	            r   batch_stop_instanceBccClient.batch_stop_instanceo  s    ( (D
 $9$;F=!$0=!<
 ! **':#$!!,"2"2Dtzz$?OX^!nnr   c                     Sn0 nUc  [        5       US'   OXGS'   UUUS.nU R                  [        R                  U[        R
                  " U5      XuS9$ )a&  
get short-long id mapping by short/long id list

:param ids:
    short id list
:type ids: list of string

:param id_type:
    id type
:type id_type: string. value: short|long

:param object_type:
    object type
:type object_type: value: bcc

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/id/mappingr7   )r   idType
objectTyper  r   )	r   idsid_typeobject_typer   r   r(   r+   r)   s	            r   list_id_mappingsBccClient.list_id_mappings  se    & '$9$;F=!$0=!%

 !!,"3"3T

4@PY_!oor   c	                     Sn	SS0n
Uc  [        5       U
S'   OXzS'   UUS.nUb  X;S'   Ub  XKS'   Ub  X[S'   Ub  XkS	'   U R                  [        R                  U	[        R
                  " U5      XS
9$ )a  
batch resize instance

:param instance_ids:
    Identify of the instances to return info
:type instance_ids: list of string

:param spec:
    spec
:type spec: string

:param subnet_id:
    subnet id
:type subnet_id: string

:param logical_zone:
    logical zone name
:type logical_zone: string

:param internal_ip_v4:
    internal ip for ipv4
:type internal_ip_v4: string

:param enable_jumbo_frame:
    The parameter of specified the instance enable/disable jumbo frame.
    True means enable jumbo frame, false means disable jumbo frame.
    enable_jumbo_frame default None which means:
    When you change to the spec which doesn't support jumbo frame, the jumbo frame will be disabled.
    When the original instance don't support jumbo frame and you change to the spec which support jumbo frame,
    the jumbo frame will be disabled.
    When the original spec of the instance support jumbo frame , then you change to the spec which support jumbo
    frame, if the original instance enable jumbo frame, the jumbo frame will be enabled, if the original instance
    disable jumbo frame, the jumbo frame will be disabled.
:type enable_jumbo_frame: bool

:return:
:rtype baidubce.bce_response.BceResponse
s   /instanceBatchBySpecr(  Nr7   instanceIdListr>   rR   logicalZoneinternalIpV4r  r  rN  )r   r   r>   r   logical_zoneinternal_ip_v4r  r   r   r(   r+   r)   s               r   batch_resize_instanceBccClient.batch_resize_instance  s    P 'd
 $9$;F=!$0=!*
  (#".%#1 )'9#$!!,"2"2Dtzz$?OX^!nnr   c                     SnSS0nUc  [        5       US'   OXXS'   UUS.n	Ub  X9S'   Ub  XIS'   U R                  [        R                  U[        R
                  " U	5      XS9$ )	ax  
list available specs of resize instance in specified zone

:param instance_ids:
    Identify of the instances to return info
:type instance_ids: list of string

:param spec:
    spec
:type spec: string

:param spec_id:
    spec id
:type spec_id: string

:param logical_zone:
    logical zone name
:type logical_zone: string

:return:
:rtype baidubce.bce_response.BceResponse
r6   
resizeListNr7   r  r   zoner  r   )
r   r   r>   r   r  r   r   r(   r+   r)   s
             r   list_available_resize_specs%BccClient.list_available_resize_specs  s    0 $
 $9$;F=!$0=!*
 $N#'L!!,"3"3T

4@PY_!oor   c                     SnSS0nUc  [        5       US'   OX%S'   SU Vs/ s H  ofR                  PM     sn0nU R                  [        R                  U[
        R                  " U5      XSS9$ s  snf )z
batch change instance to prepay

:param change_pay_timing_req_list:
    batch change req list
:type change_pay_timing_req_list: list of PayTimingChangeReqModel

:return:
:rtype baidubce.bce_response.BceResponse
   /instance/batch/chargingrr  Nr7   r   r  r  r   change_pay_timing_req_listr   r   r(   r+   change_pay_timing_reqr)   s           r   batch_change_instance_to_prepay)BccClient.batch_change_instance_to_prepay  s     +
 $9$;F=!$0=!SmnSm:O55Smn
 !!,"3"3T

4@PY_!oo o   A.c                     SnSS0nUc  [        5       US'   OX%S'   SU Vs/ s H  ofR                  PM     sn0nU R                  [        R                  U[
        R                  " U5      XSS9$ s  snf )z
batch change instance to postpay

:param change_pay_timing_req_list:
    batch change req list
:type change_pay_timing_req_list: list of PayTimingChangeReqModel

:return:
:rtype baidubce.bce_response.BceResponse
r  	toPostpayNr7   r   r  r  r  s           r    batch_change_instance_to_postpay*BccClient.batch_change_instance_to_postpay5  s     +
 $9$;F=!$0=!SmnSm:O55Smn
 !!,"3"3T

4@PY_!oo or  c                 r    Sn0 nUc  [        5       US'   OXS'   U R                  [        R                  X4US9$ )zG
list instance role

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/role/listr7   rn   r+  )r   r   r   r(   r+   s        r   list_instance_rolesBccClient.list_instance_rolesM  sH     &$9$;F=!$0=!!!,"2"2DPV!WWr   c                     SnSS0n/ nU H  nUR                  SU05        M     Uc  [        5       US'   OX6S'   UUS.n	U R                  [        R                  U[
        R                  " U	5      XdS9$ )z
bind_instance_role

:param instance_ids:
    instance id list
:type instance_ids: list of string

:param role_name:
    name of role
:type role_name: string

:return:
:rtype baidubce.bce_response.BceResponse
   /instance/roler0  Nr   r7   	instancesroleNamer  r  rp   r-   r	   ru   rv   rw   
r   r   	role_namer   r   r(   r+   r  r   r)   s
             r   bind_instance_roleBccClient.bind_instance_role\  s     !D
 	'KlK89 ($9$;F=!$0=!"!
 !!,"3"3T

4@PY_!oor   c                     SnSS0n/ nU H  nUR                  SU05        M     Uc  [        5       US'   OX6S'   UUS.n	U R                  [        R                  U[
        R                  " U	5      XdS9$ )z
unbind_instance_role

:param instance_ids:
    instance id list
:type instance_ids: list of string

:param role_name:
    name of role
:type role_name: string

:return:
:rtype baidubce.bce_response.BceResponse
r  r5  Nr   r7   r  r  r  r  s
             r   unbind_instance_roleBccClient.unbind_instance_role|  s     !d
 	'KlK89 ($9$;F=!$0=!"!
 !!,"3"3T

4@PY_!oor   c                     Sn0 nUc  [        5       US'   OXGS'   UUUS.nU R                  [        R                  U[        R
                  " U5      XuS9$ )a$  
add_ipv6

:param instance_id:
    instance id
:type instance_id: list of string

:param ipv6_address:
    ipv6 address to bind instance
:type ipv6_address: list of string

:param reboot:
    reboot the instance
:type reboot: list of string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/addIpv6r7   )r   ipv6Addressr   r  r   )	r   r   ipv6_addressr   r   r   r(   r+   r)   s	            r   add_ipv6BccClient.add_ipv6  se    & $$9$;F=!$0=!%'

 !!,"3"3T

4@PY_!oor   c                     Sn0 nUc  [        5       US'   OX6S'   UUS.nU R                  [        R                  U[        R
                  " U5      XdS9$ )z
delete_ipv6

:param instance_id:
    instance id
:type instance_id: list of string

:param reboot:
    reboot the instance
:type reboot: list of string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/delIpv6r7   )r   r   r  r   )r   r   r   r   r   r(   r+   r)   s           r   delete_ipv6BccClient.delete_ipv6  sb     $$9$;F=!$0=!%
 !!,"3"3T

4@PY_!oor   c                    UR                  SS9nSU-  nSS0nUc  [        5       US'   OX6S'   U Vs/ s H  owR                  PM     nnSU0n	U R                  [        R
                  U[        R                  " U	5      XdS9$ s  snf )	z
bind_image_to_tags

:param image_id:
    image id
:type image_id: list of string

:param tags
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:return:
:rtype baidubce.bce_response.BceResponse
r   r      /image/%s/tagr0  Nr7   r=  r  r   rp   rr   r-   r	   r   rv   rw   
r   r4   rj   r   r   r(   r+   r   r   r)   s
             r   bind_image_to_tagsBccClient.bind_image_to_tags  s     ??G?4(*D
 $9$;F=!$0=!,01DSLLD1(
 !!,"2"2Dtzz$?OX^!nn	 2   Bc                    UR                  SS9nSU-  nSS0nUc  [        5       US'   OX6S'   U Vs/ s H  owR                  PM     nnSU0n	U R                  [        R
                  U[        R                  " U	5      XdS9$ s  snf )	z
unbind_image_to_tags

:param image_id:
    image id
:type image_id: list of string

:param tags
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:return:
:rtype baidubce.bce_response.BceResponse
r   r   r  r5  Nr7   r=  r  r  r  s
             r   unbind_image_to_tagsBccClient.unbind_image_to_tags  s     ??G?4(*d
 $9$;F=!$0=!,01DSLLD1(
 !!,"2"2Dtzz$?OX^!nn	 2r  c                     Sn0 nUc  [        5       US'   OX|S'   UUUUUUS.nU	(       a  XS'   U
b  XS'   U R                  [        R                  U[        R
                  " U5      XS9$ )a  
import_custom_image

:param os_name:
    name of os
:type os_name: string

:param os_arch:
        archicture of os
:type os_arch: string

:param os_type:
    type of os
:type os_type: string

:param os_version:
    version of os
:type os_version: string

:param name:
    name of os
:type name: string

:param bos_url:
    boot script of os
:type bos_url: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /image/importr7   )osNameosArchosType	osVersionrO   bosUrlr  generationTyper  r   )r   os_nameos_archos_type
os_versionrO   bos_urlr   r   r  generation_typer(   r+   r)   s                 r   import_custom_imageBccClient.import_custom_image  s    @  $9$;F=!$0=!#
  )&%4!"!!,"3"3T

4@PY_!oor   c                    UR                  SS9nSU-  n0 nUc  [        5       US'   OX6S'   SU Vs/ s H  owR                  PM     sn0nU R                  [        R
                  U[        R                  " U5      XdS9$ s  snf )a  
create_remote_copy_snapshot

:param snapshot_id:
    identify of snapshot
:type snapshot_id: string

:param dest_region_infos:
    information of destination region
:type dest_region_infos: list of bcc_model.DestRegionInfoModel

:return:
:rtype baidubce.bce_response.BceResponse
r   r   s   /snapshot/remote_copy/%sr7   destRegionInfosr  r  )	r   r  dest_region_infosr   r   r(   r+   dest_region_infor)   s	            r   create_remote_copy_snapshot%BccClient.create_remote_copy_snapshotG  s     "(('(:*[8$9$;F=!$0=!RcdRc>N 9 9Rcd
 !!,"2"2Dtzz$?OX^!nn  es   A>c                     Sn0 nUc  [        5       US'   OXXS'   0 n	Ub  XS'   Ub  X)S'   Ub  X9S'   Ub  XIS'   U R                  [        R                  U[        R
                  " U	5      XS9$ )a  
create_deploy_set

:param name:
    name of deploy set
:type name: string

:param strategy:
    deploy strategy HOST_HA | RACK_HA | TOR_HA
:type strategy: string

:param desc:
    description of deploy set
:type desc: string

:param concurrency:
    mark how many instances can created in one location
    location means host for HOST_HA, rack for RACK_HA, tor for TOR_HA
:type concurrency: int

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/deployset/creater7   rO   strategyr  concurrencyr  r   )
r   rO   r  r  r  r   r   r(   r+   r)   s
             r   create_deploy_setBccClient.create_deploy_setb  s    0 -$9$;F=!$0=!L'L""-!!,"3"3T

4@PY_!oor   c                     Sn0 nUc  [        5       US'   OXS'   Ub  X5S'   U R                  [        R                  XEUS9$ )z
list_deploy_sets

:param deployment_set_ids:
:type deployment_set_ids: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/deployset/listr7   deploymentSetIdsrn   r+  )r   r   r   deployment_set_idsr(   r+   s         r   list_deploy_setsBccClient.list_deploy_sets  sW     +$9$;F=!$0=!));%&!!,"2"2DPV!WWr   c                     UR                  SS9nSU-  n0 nUc  [        5       US'   OX%S'   U R                  [        R                  XEUS9$ )z
delete_deploy_set

:param deploy_set_id:
    identify of deployset
:type deploy_set_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r   r      /instance/deployset/%sr7   rn   )r   rp   r-   r	   r  r   deploy_set_idr   r   r(   r+   s         r   delete_deploy_setBccClient.delete_deploy_set  s`     &,,g,>(=8$9$;F=!$0=!!!,"5"5tSY!ZZr   c                     UR                  SS9nSU-  nSS0nUc  [        5       US'   OXGS'   0 nUb  X(S'   Ub  X8S'   U R                  [        R                  U[
        R                  " U5      XuS	9$ )
a
  
modify_deploy_set

:param deploy_set_id:
    identify of deployset
:type deploy_set_id: string

:param name:
    name of deploy set
:type name: string

:param desc:
    description of deploy set
:type desc: string

:return:
:rtype baidubce.bce_response.BceResponse
r   r   r  r  Nr7   rO   r  r  rk  )	r   r  rO   r  r   r   r(   r+   r)   s	            r   modify_deploy_setBccClient.modify_deploy_set  s    & &,,g,>(=8t
 $9$;F=!$0=!LL!!,"2"2Dtzz$?OX^!nnr   c                     UR                  SS9nSU-  n0 nUc  [        5       US'   OX%S'   U R                  [        R                  XEUS9$ )z
get_deploy_set

:param deploy_set_id:
    identify of deployset
:type deploy_set_id: string

:return:
:rtype baidubce.bce_response.BceResponse
r   r   s   /deployset/%sr7   rn   rd  r  s         r   get_deploy_setBccClient.get_deploy_set  s`     &,,g,>-/$9$;F=!$0=!!!,"2"2DPV!WWr   c                     Sn0 nUc  [        5       US'   OXGS'   UUS.nUb  X8S'   U R                  [        R                  U[        R
                  " U5      XuS9$ )z
update instance deploy relation

:param instance_id:
    identify of instance
:type instance_id: string

:param deployset_id_list:
    identify list of deployset
:type deployset_id_list: string

:return:
:rtype baidubce.bce_response.BceResponse
s"   /instance/deployset/updateRelationr7   )r   deploysetIdListforcer  r   )	r   r   deployset_id_listr  r   r   r(   r+   r)   s	            r   update_instance_deploy BccClient.update_instance_deploy  so      5$9$;F=!$0=!%0
 !M!!,"3"3T

4@PY_!oor   c                     Sn0 nUc  [        5       US'   OX6S'   UUS.nU R                  [        R                  U[        R
                  " U5      XdS9$ )z
delete instance deploy relation

:param instance_id_list:
    identify list of instance
:type instance_id_list: string

:param deploy_set_id:
    identify of deployset
:type deploy_set_id: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/deployset/delRelationr7   )r  rc   r  r   )r   r  r  r   r   r(   r+   r)   s           r   del_instance_deployBccClient.del_instance_deploy	  sb     2$9$;F=!$0=!.%
 !!,"3"3T

4@PY_!oor   c                     Sn0 nUc  [        5       US'   OXGS'   UUS.nUb  X8S'   U R                  [        R                  U[        R
                  " U5      XuS9$ )a  
create ehc cluster

:param name:
    The name of the EHC cluster. This parameter is required.
:type name: string

:param zone_name:
    The availability zone name where the EHC cluster will be created.
:type zone_name: string

:param description:
    Optional. A brief description of the EHC cluster. Default is an empty string.
:type description: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/ehc/cluster/creater7   )rO   rQ   r  r  r   )	r   rO   r   r  r   r   r(   r+   r)   s	            r   create_ehc_clusterBccClient.create_ehc_cluster$  sp    & /$9$;F=!$0=!!
 ""-!!,"3"3T

4@PY_!oor   c                     Sn0 nUc  [        5       US'   OXGS'   SU0nUb  X(S'   Ub  X8S'   U R                  [        R                  U[        R
                  " U5      XuS9$ )a  
Modifies the name and description of an EHC cluster.

:param ehc_cluster_id:
    The ID of the EHC cluster to be modified. This parameter is required.
:type ehc_cluster_id: string

:param name:
    Optional. The new name for the EHC cluster. If not specified, the name will not be changed.
:type name: string

:param description:
    Optional. The new description for the EHC cluster. If not specified, the description will not be changed.
:type description: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/ehc/cluster/modifyr7   rW   rO   r  r  r   )	r   r   rO   r  r   r   r(   r+   r)   s	            r   modify_ehc_clusterBccClient.modify_ehc_clusterE  s|    & /$9$;F=!$0=!N
 L""-!!,"3"3T

4@PY_!oor   c                     Sn0 n0 nUb  XS'   Ub  X'S'   Ub  X7S'   U R                  [        R                  U[        R                  " U5      XdS9$ )a  
get ehc cluster list

:param ehc_cluster_id_list:
    Optional. List of EHC cluster IDs to filter the results. If not specified, retrieves all clusters.
:type ehc_cluster_id_list: list<string>

:param name_list:
    Optional. List of EHC cluster names to filter the results. If not specified, retrieves all clusters.
:type name_list: list<string>

:param zone_name:
    Optional. The name of the availability zone to filter the results.
:type zone_name: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/ehc/cluster/listehcClusterIdListnameListrQ   r  r  )r   ehc_cluster_id_list	name_listr   r   r(   r+   r)   s           r   get_ehc_cluster_listBccClient.get_ehc_cluster_listh  sh    & -*':#$ ( (!!,"3"3T

4@PY_!oor   c                     Sn0 nUc  [        5       US'   OX%S'   SU0nU R                  [        R                  U[        R
                  " U5      XSS9$ )z
Modifies the name and description of an EHC cluster.

:param ehc_cluster_id_list:
    A list of IDs of the EHC clusters to be deleted. This parameter is required.
:type ehc_cluster_id_list: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/ehc/cluster/deleter7   r!  r  r   )r   r#  r   r   r(   r+   r)   s          r   delete_ehc_clusterBccClient.delete_ehc_cluster  sb     /$9$;F=!$0=! 3
 !!,"3"3T

4@PY_!oor   c                     Sn0 nUb  XS'   Ub  X'S'   Ub  X7S'   Ub  XGS'   U R                  [        R                  XgUS9$ )a  
:param marker:
    The optional parameter marker specified in the original request to specify
    where in the results to begin listing.
    Together with the marker, specifies the list result which listing should begin.
    If the marker is not specified, the list result will listing from the first one.
:type marker: string

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

:param os_name:
    The optional parameter to query specified public image by os name.
:type os_name: string

:param spec:
    The required parameter to query specified public image by spec.
:type spec: string

:return:
:rtype baidubce.bce_response.BceResponse
s   /image/getAvailableImageBySpecr   r   r>   r  rn   r   )r   r   r   r>   r  r   r(   r+   s           r   get_available_images_by_spec&BccClient.get_available_images_by_spec  sd    2 1%8 (9!6N&8!!,"2"2DPV!WWr   c                    Sn0 nUb  UUS'   0 nUb  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub  UUS	'   Ub  UUS
'   U	b  U	US'   U
b  U
US'   Ub  UUS'   USLa  [        U5      R                  5       US'   Ub  UUS'   Ub  UUS'   Ub  UUS'   Ub!  U Vs/ s H  nUR                  PM     nnUUS'   U R                  [        R
                  U[        R                  " U5      UUS9$ s  snf )a  
Create reserved instances.

:param reserved_instance_name:
    The name of the reserved instance.
:type reserved_instance_name: string

:param scope:
    The scope.
:type scope: string

:param zone_name:
    The name of the availability zone.
:type zone_name: string

:param spec:
    The instance specification.
:type spec: string

:param offering_type:
    The offering type.
:type offering_type: string

:param instance_count:
    The number of instances.
:type instance_count: int

:param reserved_instance_count:
    The number of reserved instances.
:type reserved_instance_count: int

:param reserved_instance_time:
    The duration of the reserved instance.
:type reserved_instance_time: int

:param reserved_instance_time_unit:
    The time unit of the reserved instance.
:type reserved_instance_time_unit: string

:param auto_renew_time_unit:
    The time unit for automatic renewal.
:type auto_renew_time_unit: string

:param auto_renew_time:
    The duration for automatic renewal.
:type auto_renew_time: int

:param auto_renew:
    Whether to enable automatic renewal, defaults to False.
:type auto_renew: bool

:param effective_time:
    The effective time.
    It is immediately effective by default.
:type effective_time: string

:param ehc_cluster_id:
    The EHC cluster ID.
:type ehc_cluster_id: string

:param ticket_id:
    The ticket ID.
:type ticket_id: string

:param tags:
    The optional list of tag to be bonded.
:type tags: list<bcc_model.TagModel>

:return:
:rtype: baidubce.bce_response.BceResponse
s   /instance/reserved/creater7   reservedInstanceNamescoperQ   r>   offeringTypeinstanceCountreservedInstanceCountreservedInstanceTimereservedInstanceTimeUnitr`   r^   Fr   effectiveTimerW   ticketIdrj   r  )strlowerrr   r-   r	   ru   rv   rw   )r   reserved_instance_namer/  r   r>   offering_typeinstance_countreserved_instance_countreserved_instance_timereserved_instance_time_unitr~   r   r   effective_timer   	ticket_idrj   r   r   r(   r+   r)   r   r   s                           r   create_reserved_instances#BccClient.create_reserved_instances  s   ^ ,#$0F=!!-+AD'(!DM (DDL$#0D %$2D!".,CD()!-+AD'(&2/JD+,+(<D$%&$3D!U" #J 5 5 7D%$2D!%#1D  (D045H5#DL!!,"3"3T

4@PY_hn!oo 6s   'C9c                     Sn0 nUb  X%S'   0 nUb  U Vs/ s H  owR                   PM     nnXS'   U R                  [        R                  U[        R
                  " U5      XSS9$ s  snf )a   
Modify the information of reserved instances.

:param reserved_instances:
    A list of dictionaries containing the information of reserved instances to be updated.
:type reserved_instances: list<bcc_model.ModifyReservedInstanceModel>

:return:
:rtype: baidubce.bce_response.BceResponse
s   /instance/reserved/modifyr7   reservedInstancesr  r?  )	r   reserved_instancesr   r   r(   r+   r)   reserved_instancereserved_instances_lists	            r   modify_reserved_instances#BccClient.modify_reserved_instances>  s|     ,#$0=!)[m&n[mFW'A'A[m#&n(?$%!!,"2"2Dtzz$?OX^!nn 'os   A$c                     Sn0 nUc  [        5       US'   OX%S'   SU0nU R                  [        R                  U[        R
                  " U5      XSS9$ )z
get_instance_user_data
s   /instance/attribute/getUserdatar7   r   rn   r   r  s          r   get_instance_user_data BccClient.get_instance_user_dataW  si     2$9$;F=!$0=!+
 !!,"3"3T4::d;K)/ " @ 	@r   c                     Sn0 nUc  [        5       US'   OXGS'   UUUS.nU R                  [        R                  U[        R
                  " U5      XuS9$ )u   
进入救援模式。

:param enter_rescue_mode_req:
:desc
:type enter_rescue_mode_req: json

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/rescue/mode/enterr7   )r   r   passwordrn   rN  )	r   r   r   rN  r   r   r(   r+   r)   s	            r   enter_rescue_modeBccClient.enter_rescue_modeg  so     .$9$;F=!$0=! &# 

 !!,"2"2D$**T:J)/ " @ 	@r   c                     Sn0 nUc  [        5       US'   OX%S'   SU0nU R                  [        R                  U[        R
                  " U5      XSS9$ )u   
退出救援模式。

:param exit_rescue_mode_req:
:desc
:type exit_rescue_mode_req: json

:return:
:rtype baidubce.bce_response.BceResponse
s   /instance/rescue/mode/exitr7   r   rn   rN  r  s          r   exit_rescue_modeBccClient.exit_rescue_mode  sk     -$9$;F=!$0=! +
 !!,"2"2D$**T:J)/ " @ 	@r   c                     Sn0 nUc  [        5       US'   OXGS'   UUUS.nU R                  [        R                  U[        R
                  " U5      XuS9$ )uq   
绑定安全组。

:param bind_sg:
:desc
:type bind_sg: json
:return:
:rtype baidubce.bce_response.BceResponse
s   /securitygroup/bindr7   r   rU   securityGroupTypern   rN  	r   r   r   security_group_typer   r   r(   r+   r)   s	            r   bind_sgBccClient.bind_sg  so     &$9$;F=!$0=! ( 2!4

 !!,"2"2D$**T:J)/ " @ 	@r   c                     Sn0 nUc  [        5       US'   OXGS'   UUUS.nU R                  [        R                  U[        R
                  " U5      XuS9$ )ux   
替换安全组。

:param replace_sg:
:desc
:type replace_sg: json

:return:
:rtype baidubce.bce_response.BceResponse
s   /securitygroup/replacer7   rU  rn   rN  rW  s	            r   
replace_sgBccClient.replace_sg  so     )$9$;F=!$0=! ( 2!4

 !!,"2"2D$**T:J)/ " @ 	@r   c                     Sn0 nUc  [        5       US'   OXGS'   UUUS.nU R                  [        R                  U[        R
                  " U5      XuS9$ )uv   
解绑安全组。

:param unbind_sg:
:desc
:type unbind_sg: json

:return:
:rtype baidubce.bce_response.BceResponse
s   /securitygroup/unbindr7   rU  rn   rN  rW  s	            r   	unbind_sgBccClient.unbind_sg  so     ($9$;F=!$0=! ( 2!4

 !!,"2"2D$**T:J)/ " @ 	@r   c                     Sn0 nUc  [        5       US'   OXhS'   SUS'   UUUUS.n	U R                  [        R                  U[        R
                  " U	5      XS9$ )aE  
authorize_server_event

:param authorize_maintenance_operation:
    Authorized operation and maintenance operations
:type authorize_maintenance_operation: string

:param server_event_id:
    event Id.
:type marker: string

:param instance_id:
    Instance Id, server Event ID, instance ID must select one of the request options
:type max_keys: string

:param execute_time:
    Authorized execution time,
    The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
:type execute_time: string

:return:
:rtype baidubce.bce_response.BceResponse
   /r7   AuthorizeServerEventrN  )serverEventIdr   authorizeMaintenanceOperationexecuteTimern   rp   r0   r	   ru   rv   rw   )
r   authorize_maintenance_operationserver_event_idr   execute_timer   r   r(   r+   r)   s
             r   authorize_server_event BccClient.authorize_server_event  sz    2 $9$;F=!$0=!1x,%-L'	
 (():):D$**TBR06 ) G 	Gr   c	                     Sn	0 n
Uc  [        5       U
S'   OXS'   SU
S'   UUUUUUS.nU R                  [        R                  U	[        R
                  " U5      XS9$ )a4  
create_authorize_rule

:param server_event_category:
    Server Event Category
:type server_event_category: string

:param authorize_maintenance_operations:
    Authorized operation and maintenance operations
:type authorize_maintenance_operations: list

:param rule_name:
    Rule Name
:type rule_name: string

:param enable_rule:
    Whether to enable the rule
:type enable_rule: int

:param effective_scope:
    Effective scope
:type effective_scope: String

:param tags:
    Tag information
:type tags: list

:return:
:rtype baidubce.bce_response.BceResponse
rb  r7   CreateAuthorizeRulerN  )
enableRuleserverEventCategoryauthorizeMaintenanceOperationsrj   effectiveScoperuleNamern   rg  )r   server_event_category authorize_maintenance_operations	rule_nameenable_ruleeffective_scoperj   r   r   r(   r+   r)   s               r   create_authorize_ruleBccClient.create_authorize_rule  s    @ $9$;F=!$0=!0x%#8.N-!
 (():):D$**TBR06 ) G 	Gr   c	                     Sn	0 n
Uc  [        5       U
S'   OXS'   SU
S'   UUUUUUS.nU R                  [        R                  U	[        R
                  " U5      XS9$ )a  
modify_authorize_rule

:param rule_id:
    rule_id to be modified
:type rule_id: string

:param authorize_maintenance_operations:
    Authorized operation and maintenance operations
:type authorize_maintenance_operations: list

:param rule_name:
    Rule Name
:type rule_name: string

:param enable_rule:
    Whether to enable the rule
:type enable_rule: int

:param effective_scope:
    Effective scope
:type effective_scope: String

:param tags:
    Tag information
:type tags: list

:return:
:rtype baidubce.bce_response.BceResponse
rb  r7   &ModifyInstUserOpAuthorizeRuleAttributerN  )ro  rq  rj   rr  rs  ruleIdrn   rg  )r   rule_idru  rv  rw  rx  rj   r   r   r(   r+   r)   s               r   modify_authorize_ruleBccClient.modify_authorize_ruleK  s    @ $9$;F=!$0=!Cx%.N-!
 (():):D$**TBR06 ) G 	Gr   c                     Sn0 nUc  [        5       US'   OX5S'   SUS'   SU0nU R                  [        R                  U[        R
                  " U5      XRS9$ )z
delete_authorize_rule

:param rule_id:
    rule_id to be deleted
:type rule_id: string

:return:
:rtype baidubce.bce_response.BceResponse
rb  r7   DeleteInstUserOpAuthorizeRulerN  r}  rn   rg  )r   r~  r   r   r(   r+   r)   s          r   delete_authorize_ruleBccClient.delete_authorize_rule}  ss     $9$;F=!$0=!:xg
 (():):D$**TBR06 ) G 	Gr   c                     Sn0 nSUS'   UUUUS.nU R                  [        R                  U[        R                  " U5      XuS9$ )a  
 describe_authorize_rules

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

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

:param rule_ids:
     filter rule list with multiple rule ids
 :type rule_ids: string

 :param rule_names:
     filter rule list with multiple rule names
 :type rule_names: list

 :return:
 :rtype baidubce.bce_response.BceResponse
 rb  DescribeAuthorizeRulesrN  )r   r   ruleIds	ruleNamesrn   r0   r	   ru   rv   rw   )	r   r   r   rule_ids
rule_namesr   r(   r+   r)   s	            r   describe_authorize_rules"BccClient.describe_authorize_rules  s_    6 3x#	
 (():):D$**TBR06 ) G 	Gr   c                     Sn0 nSUS'   UUUUUUUUU	U
S.
nU R                  [        R                  U[        R                  " U5      XS9$ )a'  
 describe_planned_events

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

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

:param server_event_ids:
     filter planned event list with multiple server event ids
 :type server_event_ids: list of string

 :param instance_ids:
     filter planned event list with multiple instance ids
 :type instance_ids: list of string

 :param product_category:
     filter planned event list with product_category
 :type product_category: string

 :param server_event_type:
     filter planned event list with server_event_type
 :type server_event_type: string

 :param server_event_log_time_filter:
     filter planned event list with server_event_log_time_filter,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type server_event_log_time_filter: string

 :param period_start_time:
     filter planned event list with period_start_time,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type period_start_time: string

 :param period_end_time:
     filter planned event list with period_end_time,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type period_end_time: string

 :param server_event_status:
     filter planned event list with server_event_status
 :type server_event_status: string

 :return:
 :rtype baidubce.bce_response.BceResponse
 rb  DescribePlannedEventsrN  
r   r   serverEventIdsr   productCategoryserverEventTypeserverEventLogTimeFilterperiodStartTimeperiodEndTimeserverEventStatusrn   r  r   r   r   server_event_idsr   product_categoryserver_event_typeserver_event_log_time_filterperiod_start_timeperiod_end_timeserver_event_statusr   r(   r+   r)   s                  r   describe_planned_events!BccClient.describe_planned_events  sr    p 2x.'/0(D0,!4
 (():):D$**TBR06 ) G 	Gr   c           
          Sn0 nSUS'   UUUUUUUUU	S.	nU R                  [        R                  U[        R                  " U5      XS9$ )a  
 describe_planned_recored_events

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

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

:param server_event_ids:
     filter planned event list with multiple server event ids
 :type server_event_ids: list of string

 :param instance_ids:
     filter planned event list with multiple instance ids
 :type instance_ids: list of string

 :param product_category:
     filter planned event list with product_category
 :type product_category: string

 :param server_event_type:
     filter planned event list with server_event_type
 :type server_event_type: string

 :param server_event_log_time_filter:
     filter planned event list with server_event_log_time_filter,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type server_event_log_time_filter: string

 :param period_start_time:
     filter planned event list with period_start_time,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type period_start_time: string

 :param period_end_time:
     filter planned event list with period_end_time,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type period_end_time: string

 :return:
 :rtype baidubce.bce_response.BceResponse
 rb  DescribePlannedEventRecordsrN  	r   r   r  r   r  r  r  r  r  rn   r  r   r   r   r  r   r  r  r  r  r  r   r(   r+   r)   s                 r   describe_planned_recored_events)BccClient.describe_planned_recored_events  so    j 8x.'/0(D0,

 (():):D$**TBR06 ) G 	Gr   c                     Sn0 nSUS'   UUUUUUUUU	U
S.
nU R                  [        R                  U[        R                  " U5      XS9$ )a9  
 describe_unplanned_events

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

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

:param server_event_ids:
     filter unplanned event list with multiple server event ids
 :type server_event_ids: list of string

 :param instance_ids:
     filter unplanned event list with multiple instance ids
 :type instance_ids: list of string

 :param product_category:
     filter unplanned event list with product_category
 :type product_category: string

 :param server_event_type:
     filter unplanned event list with server_event_type
 :type server_event_type: string

 :param server_event_log_time_filter:
     filter unplanned event list with server_event_log_time_filter,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type server_event_log_time_filter: string

 :param period_start_time:
     filter unplanned event list with period_start_time,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type period_start_time: string

 :param period_end_time:
     filter unplanned event list with period_end_time,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type period_end_time: string

 :param server_event_status:
     filter unplanned event list with server_event_status
 :type server_event_status: string

 :return:
 :rtype baidubce.bce_response.BceResponse
 rb  DescribeUnplannedEventsrN  r  rn   r  r  s                  r   describe_unplanned_events#BccClient.describe_unplanned_eventsL  sr    p 4x.'/0(D0,!4
 (():):D$**TBR06 ) G 	Gr   c           
          Sn0 nSUS'   UUUUUUUUU	S.	nU R                  [        R                  U[        R                  " U5      XS9$ )a  
 describe_unplanned_recored_events

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

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

:param server_event_ids:
     filter unplanned event list with multiple server event ids
 :type server_event_ids: list of string

 :param instance_ids:
     filter unplanned event list with multiple instance ids
 :type instance_ids: list of string

 :param product_category:
     filter unplanned event list with product_category
 :type product_category: string

 :param server_event_type:
     filter unplanned event list with server_event_type
 :type server_event_type: string

 :param server_event_log_time_filter:
     filter unplanned event list with server_event_log_time_filter,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type server_event_log_time_filter: string

 :param period_start_time:
     filter unplanned event list with period_start_time,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type period_start_time: string

 :param period_end_time:
     filter unplanned event list with period_end_time,
     The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
 :type period_end_time: string

 :return:
 :rtype baidubce.bce_response.BceResponse
 rb  DescribeUnplannedEventRecordsrN  r  rn   r  r  s                 r   !describe_unplanned_recored_events+BccClient.describe_unplanned_recored_events  so    j :x.'/0(D0,

 (():):D$**TBR06 ) G 	Gr   c                     Sn0 n	Uc  [        5       U	S'   OXyS'   SU	S'   UUUUUS.n
U R                  [        R                  U[        R
                  " U
5      XS9$ )a  
check_unplanned_event

:param server_event_id:
    server_event_id to be check
:type server_event_id: string

:param check_result:
    Whether unplanned events have passed the acceptance, supporting parameters Pass and Reject
:type check_result: string

:param issue_effect:
    Fault effect must be passed when the fault acceptance is rejected
:type issue_effect: string

:param issue_description:
    Fault description must be passed when the fault acceptance is rejected
:type issue_description: string

:param authorize_maintenance_operation:
    Authorized operation and maintenance
:type authorize_maintenance_operation: string

:return:
:rtype baidubce.bce_response.BceResponse
rb  r7   CheckUnplannedEventrN  )rd  checkResultissueEffectissueDescriptionre  rn   rg  )r   ri  check_resultissue_effectissue_descriptionrh  r   r   r(   r+   r)   s              r   check_unplanned_eventBccClient.check_unplanned_event  s}    8 $9$;F=!$0=!0x,'' 1-L
 (():):D$**TBR06 ) G 	Gr   c                 |    Sn0 nUUS.nU R                  [        R                  U[        R                  " U5      XSS9$ )a-  
get_task

:param task_ids:
    task_ids to be used to query the task
:type task_ids: list of string

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

:return:
:rtype baidubce.bce_response.BceResponse
s   /task/detail)taskIdsr   rn   r  )r   task_idsr   r   r(   r+   r)   s          r   get_taskBccClient.get_task	  sQ        
 !!,"3"3T4::d;K)/ " @ 	@r   c	                     Sn	0 n
UUUUUUUS.nU R                  [        R                  U	[        R                  " U5      XS9$ )aI  
list_task

:param task_ids:
    task_ids to be used to query the task
:param task_action:
    task_action to be used to query the task
:param task_status:
    task_status to be used to query the task
:param start_time:
    The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
:param end_time:
    The format is yyyy-MM-dd'T'HH: mm: ss'Z ', if it is empty, query the operation log of the day
:param max_keys:
    The optional parameter to specifies the max number of list result to return.
    The default value is 10.
:param config:
:return:

s
   /task/list)r  
taskAction
taskStatus	startTimeendTimerL  r   rn   r  )r   r   r  task_actiontask_statusrU  
start_timeend_timer   r(   r+   r)   s               r   	list_taskBccClient.list_task#  s`    ,   %%#'
 !!,"3"3T4::d;K)/ " @ 	@r    r   )NNNNNN)NNNNN)4NNNr   NNNNr   NNNNFNNNNNr   r8   r8   NNNNNNNNNNFFNNNNNNNNNNFNNNNr8   NN)Nr8   NNNNNN)3NNNr   NNNNr   NNNNFNNNNNr   r8   r8   NNNNNNNNNNNNNFFNFFNNNNNNNr8   NFN)NNNNNNNNNNNNNNNNNNNN)FN)FFN)NNNNNNN)Nr8   hp1NNNNNNNNFNNNNN)Nr8   r  NNNNNNNNNFNNNN)NNNNNNN)NN)NFNNN)AllNNNN)	NNNNNNNNN)r8   r  NPrepaid   r_   NNNNNN)r  r_   NN)NNNNNNNN)6r   NNNr   NNr8   NNNNNNNNNNNNNNNNNNr   NNNNNNNNNNNNNNNNNNNNNNNNNNN)NNNr8   NNNNNNNNNNNNNNNN)r_   r8   NNNN)FNN)NNNNNNNNNNNNNNNNNN)
NNNNNNNNNN)d   N)
   NNNNNNN)__name__
__module____qualname____firstlineno____doc__r#   rR  r   r   r-   r0   r   intbytesr7  r   r   r   r   r   r   r   r   r   r  listr  r	  r  r  r  r!  r-  r2  r6  rA  rE  rW  r]  rd  rh  rl  ry  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
   SecurityGroupRuleModelr2  r6  rH  rK  rN  rQ  r\  rb  rf  rk  rq  rt  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  boolr  r"  r%  r(  r-  r3  r7  rA  rG  rK  rO  rU  rZ  r^  ra  re  rh  rl  ro  rx  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+  rA  rH  rK  rO  rR  rY  r\  r_  rk  ry  r  r  r  r  r  r  r  r  r  r  __static_attributes__r  r   r   r   r   0   s    FI= 7;<@? >B6:	6 $'s|% Y]kopqinlpimgkpu[_dhpu?CosI@%I@V 35RU,s|% hllpfj^b	g1%g1R 35RU,s|% PTTXNRFJ	e1%e1N $'s|% `drvae/0puswptnrTXlqimhldh]b59D@%D@L ^blpkopt"	FXP 5#,'X (X0 5#,'X (X* 5#,'@ (@B 5#,'@ (@@ #]a;?'@ '@R #40@ 1@$ 5#,' @' @D 5#,3<!SWCG)@!)@V 5#,3<!@!@8 5#,s|%SW $0@%0@d 5#,'L (L* 5#,$') UY+/26S@)S@j 5#,!&.@.@4 5#,!&.@.@4 D@@& D@@&W.W. 5#,@@& 5#,@@& 5#,'I (I  5#,' ,06:04*.59B@ (B@HI S!WXBFMQW[BGDHPTI@ "I@V 5#,'WXX\PTZ^EJGK@DI@ (I@V TX $ $ 3Xj %I &I  #,(@(@:  #,(@(@:@* %L &L$   155@ 5@n  #,(@(@B % *..2(,-17@ &7@r s|3<! (,	@!@> % +/)-@ &@: % #,(
 371637-104A@(A@F % #,(
 3737-1048@(8@t TX(XT s|$I %I s|$L %L" s|3<  "&	@ @2 s|$ )-Y %Y  s|$ !#"#@ %#@J s|$ #!% $!#@ %#@J s|$ !%
I %
I 4 !\ !\ "CL*
 "!%)#D@*D@L"XH 5#,'I (I 5#,'L (L" E3<
 &*#'+/#'%)B@B@H rv$(/@b -L .L 335RV-1&@5&@P 335!@5!@H +/-1,0-1-126+/04*.6>p eS\2Y 3Y -V .VI s|##S\+
 !#$("& $!@	+!@F eS\ "@@, eS\ "@@, eS\"
L #
LX. eS\"I #I E3<($($("@ )@* E3<' %)$("&"	@'@4X& %&I 'I %! #'$("@!@, %  #'$("@ @, %&"&"L 'L %!3<) #'$("@)@. %!3<) (,)-#'@)@. %kocj_c8<!k &!kF \`#'X$ %&I 'I %"$j$j, %&[b7;@ '@6 %&QX;?@ '@0 %&@ '@* osMQ9av 3%.eiquaemqRVVZfjeiososrvhljnfjcgR@ /R@h 5#,'%o (%oN 5#,'X\hlae3p (3pj 5#,'`dptRV-p (-p^ 5#,'X (X4 5#,'X (X4 5#,5cg;?(o 6(oT &p 'p2 D"HLW[9=+p #+pZ C3Egkfjbf_cdhuk FuknY 5#,C@j Aj6 5#,4Hj Ij6 %PTCG*p &*pX SA"p B"pH @ @. X X* j jB j jB BFTX-X -X^ sj j> sj j> jn-11@f lpJN7@r Y]26)gV =A8<VZ9=7or :>rv6:.o` sX X*X,*oX VZ:>(oT dh480pd `dJN0Xdp, ^_`d(pT TX@Dp@r*#pJp, ^blpei/pbo0 VZ6:#oJp@ koQU=o~ _c>B(pTp0p0Xp@p@p@p6o<o< sw<@2pho6(pTX([(!oFX( LP9=p<p6pB!pFp>p.$XL gkcg[_^bVZGKxpto2@ @8@4@6@8@8 imLP'GT lp0Gd _cko0GdG0%GN bflposHGT jnQU]aEIDGL dhnrquHGT lpSW_cGKDGL im^b+GZ@4 fj9=#@ #@r   r   c                  >    [        [        R                  " 5       5      $ )z
The default method to generate the random string for client_token
if the optional parameter client_token is not specified by the user.
:return:
:rtype string
)r7  uuiduuid4r  r   r   generate_client_token_by_uuidr  I  s     tzz|r   c                      SR                  [        R                  " [        R                  [        R
                  -   S5      5      n U $ )z
The alternative method to generate the random string for client_token
if the optional parameter client_token is not specified by the user.
:return:
:rtype string
r/  $   )joinrandomsamplestringascii_lettersdigits)r   s    r   generate_client_token_by_randomr  S  s2     776==)=)=)MrRSLr   c
                     Sn
0 nUc  [        5       US'   OXS'   UUUUUUS.nUb  X|S'   U R                  [        R                  U
[        R
                  " U5      XS9$ )z
get_deploy_set
s   /volume/getPricer7   )rR  r   r  r  rN   rQ   r  rn   r   )r   rT  r   r  r  r   r   r  r   r   r(   r+   r)   s                r   get_cds_pricer  ^  s    
 DF 5 7} ,})'#%'D (\l//tzz$7G%+  < <r   r  )&r  
__future__r   r   rv   loggingr  r  r  baidubcer   r   baidubce.authr   baidubce.httpr   r   r	   baidubce.services.bccr
   baidubce.utilsr   r   	getLoggerr  _loggerFETCH_MODE_SYNCFETCH_MODE_ASYNCENCRYPTION_ALGORITHMr  rq   rt  r   r   r  r  r  rp   r  r   r   <module>r     s    (       $  ' ) ! & + 4 #


H
%  &/&7&7
&C #'0'8'8': $Vx@-- Vx@rp ?C<2 6 r   