bce-python-sdk 0.9.6__tar.gz → 0.9.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/PKG-INFO +1 -1
  2. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/__init__.py +1 -1
  3. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bbc/bbc_client.py +42 -0
  4. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bbc/bbc_model.py +14 -3
  5. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bcc/bcc_client.py +143 -1
  6. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bcm/bcm_client.py +76 -0
  7. bce_python_sdk-0.9.9/baidubce/services/esg/esg_client.py +307 -0
  8. bce_python_sdk-0.9.9/baidubce/services/esg/esg_model.py +82 -0
  9. bce_python_sdk-0.9.9/baidubce/services/etGateway/et_gateway_client.py +466 -0
  10. bce_python_sdk-0.9.9/baidubce/services/probe/probe_client.py +335 -0
  11. bce_python_sdk-0.9.9/baidubce/services/vcr/__init__.py +0 -0
  12. bce_python_sdk-0.9.9/baidubce/services/vpc/__init__.py +0 -0
  13. bce_python_sdk-0.9.9/baidubce/services/vpn/__init__.py +0 -0
  14. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/bce_python_sdk.egg-info/PKG-INFO +1 -1
  15. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/bce_python_sdk.egg-info/SOURCES.txt +7 -0
  16. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/setup.py +4 -1
  17. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/README.txt +0 -0
  18. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/auth/__init__.py +0 -0
  19. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/auth/bce_credentials.py +0 -0
  20. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/auth/bce_v1_signer.py +0 -0
  21. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/bce_base_client.py +0 -0
  22. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/bce_client_configuration.py +0 -0
  23. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/bce_response.py +0 -0
  24. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/compat.py +0 -0
  25. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/exception.py +0 -0
  26. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/http/__init__.py +0 -0
  27. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/http/bce_http_client.py +0 -0
  28. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/http/handler.py +0 -0
  29. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/http/http_content_types.py +0 -0
  30. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/http/http_headers.py +0 -0
  31. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/http/http_methods.py +0 -0
  32. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/protocol.py +0 -0
  33. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/region.py +0 -0
  34. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/retry/__init__.py +0 -0
  35. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/retry/retry_policy.py +0 -0
  36. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/__init__.py +0 -0
  37. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/autoscaling/__init__.py +0 -0
  38. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/autoscaling/as_client.py +0 -0
  39. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/autoscaling/as_handler.py +0 -0
  40. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/autoscaling/as_model.py +0 -0
  41. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bbc/__init__.py +0 -0
  42. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bcc/__init__.py +0 -0
  43. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bcc/bcc_model.py +0 -0
  44. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bcc/fpga_card_type.py +0 -0
  45. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bcc/gpu_card_type.py +0 -0
  46. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bcm/__init__.py +0 -0
  47. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bcm/bcm_handler.py +0 -0
  48. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bcm/bcm_model.py +0 -0
  49. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bes/__init__.py +0 -0
  50. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bes/bes_client.py +0 -0
  51. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bes/bes_model.py +0 -0
  52. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/blb/__init__.py +0 -0
  53. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/blb/app_blb_client.py +0 -0
  54. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/blb/blb_client.py +0 -0
  55. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/blb/user_service_client.py +0 -0
  56. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bmr/__init__.py +0 -0
  57. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bmr/bmr_client.py +0 -0
  58. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bos/__init__.py +0 -0
  59. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bos/bos_client.py +0 -0
  60. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bos/bos_handler.py +0 -0
  61. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bos/canned_acl.py +0 -0
  62. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bos/storage_class.py +0 -0
  63. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bts/__init__.py +0 -0
  64. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bts/bts_client.py +0 -0
  65. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bts/model.py +0 -0
  66. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/bts/util.py +0 -0
  67. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cdn/__init__.py +0 -0
  68. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cdn/cdn_client.py +0 -0
  69. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cdn/cdn_stats_param.py +0 -0
  70. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cert/__init__.py +0 -0
  71. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cert/cert_client.py +0 -0
  72. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cert/cert_model.py +0 -0
  73. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cfc/__init__.py +0 -0
  74. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cfc/cfc_client.py +0 -0
  75. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cfc/cfc_handler.py +0 -0
  76. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/cfc/models.py +0 -0
  77. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/csn/__init__.py +0 -0
  78. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/csn/csn_api.py +0 -0
  79. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/csn/csn_client.py +0 -0
  80. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/csn/csn_model.py +0 -0
  81. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/ddc/__init__.py +0 -0
  82. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/ddc/ddc_client.py +0 -0
  83. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/dns/__init__.py +0 -0
  84. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/dns/api/__init__.py +0 -0
  85. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/dns/api/dns_api.py +0 -0
  86. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/dns/dns_client.py +0 -0
  87. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/dumap/__init__.py +0 -0
  88. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/dumap/dumap_client.py +0 -0
  89. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eip/__init__.py +0 -0
  90. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eip/eip_bp_client.py +0 -0
  91. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eip/eip_client.py +0 -0
  92. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eip/eip_group_client.py +0 -0
  93. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eip/eip_group_model.py +0 -0
  94. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eip/eip_tp_client.py +0 -0
  95. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eip/model.py +0 -0
  96. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/endpoint/__init__.py +0 -0
  97. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/endpoint/endpoint_client.py +0 -0
  98. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/endpoint/model.py +0 -0
  99. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eni/__init__.py +0 -0
  100. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eni/eni_client.py +0 -0
  101. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/eni/eni_model.py +0 -0
  102. {bce-python-sdk-0.9.6/baidubce/services/et → bce_python_sdk-0.9.9/baidubce/services/esg}/__init__.py +0 -0
  103. {bce-python-sdk-0.9.6/baidubce/services/ipv6gateway → bce_python_sdk-0.9.9/baidubce/services/et}/__init__.py +0 -0
  104. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/et/et_client.py +0 -0
  105. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/et/model.py +0 -0
  106. {bce-python-sdk-0.9.6/baidubce/services/kms → bce_python_sdk-0.9.9/baidubce/services/etGateway}/__init__.py +0 -0
  107. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/havip/havip_client.py +0 -0
  108. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/iam/__init__.py +0 -0
  109. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/iam/iam_client.py +0 -0
  110. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/infinite/__init__.py +0 -0
  111. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/infinite/infinite_client.py +0 -0
  112. {bce-python-sdk-0.9.6/baidubce/services/lbdc → bce_python_sdk-0.9.9/baidubce/services/ipv6gateway}/__init__.py +0 -0
  113. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/ipv6gateway/ipv6gateway_client.py +0 -0
  114. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/ipv6gateway/ipv6gateway_model.py +0 -0
  115. {bce-python-sdk-0.9.6/baidubce/services/localdns → bce_python_sdk-0.9.9/baidubce/services/kms}/__init__.py +0 -0
  116. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/kms/keyspec_class.py +0 -0
  117. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/kms/kms_client.py +0 -0
  118. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/kms/origin_class.py +0 -0
  119. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/kms/protectedby_class.py +0 -0
  120. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/kms/publickeyencoding_class.py +0 -0
  121. {bce-python-sdk-0.9.6/baidubce/services/localdns/api → bce_python_sdk-0.9.9/baidubce/services/lbdc}/__init__.py +0 -0
  122. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/lbdc/lbdc_client.py +0 -0
  123. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/lbdc/model.py +0 -0
  124. {bce-python-sdk-0.9.6/baidubce/services/media → bce_python_sdk-0.9.9/baidubce/services/localdns}/__init__.py +0 -0
  125. {bce-python-sdk-0.9.6/baidubce/services/oos → bce_python_sdk-0.9.9/baidubce/services/localdns/api}/__init__.py +0 -0
  126. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/localdns/api/ld_api.py +0 -0
  127. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/localdns/ld_client.py +0 -0
  128. {bce-python-sdk-0.9.6/baidubce/services/route → bce_python_sdk-0.9.9/baidubce/services/media}/__init__.py +0 -0
  129. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/media/media_client.py +0 -0
  130. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/media/media_handler.py +0 -0
  131. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/mms/__init__.py +0 -0
  132. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/mms/mms_client.py +0 -0
  133. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/mvs/__init__.py +0 -0
  134. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/mvs/mvs_client.py +0 -0
  135. {bce-python-sdk-0.9.6/baidubce/services/subnet → bce_python_sdk-0.9.9/baidubce/services/oos}/__init__.py +0 -0
  136. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/oos/oos_client.py +0 -0
  137. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/oos/oos_model.py +0 -0
  138. {bce-python-sdk-0.9.6/baidubce/services/tsdb → bce_python_sdk-0.9.9/baidubce/services/probe}/__init__.py +0 -0
  139. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/__init__.py +0 -0
  140. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_backup_manager.py +0 -0
  141. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_database_manager.py +0 -0
  142. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_hot_active_instance_group_manager.py +0 -0
  143. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_http.py +0 -0
  144. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_instance_manager.py +0 -0
  145. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_log_manager.py +0 -0
  146. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_parameter_manager.py +0 -0
  147. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_readonly_group_manager.py +0 -0
  148. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_recycler_manager.py +0 -0
  149. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_security_manager.py +0 -0
  150. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_task_manager.py +0 -0
  151. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/rds/rds_users_manager.py +0 -0
  152. {bce-python-sdk-0.9.6/baidubce/services/vca → bce_python_sdk-0.9.9/baidubce/services/route}/__init__.py +0 -0
  153. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/route/route_client.py +0 -0
  154. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/route/route_model.py +0 -0
  155. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/scs/__init__.py +0 -0
  156. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/scs/model.py +0 -0
  157. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/scs/scs_client.py +0 -0
  158. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/sms/__init__.py +0 -0
  159. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/sms/model.py +0 -0
  160. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/sms/sms_client.py +0 -0
  161. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/sts/__init__.py +0 -0
  162. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/sts/sts_client.py +0 -0
  163. {bce-python-sdk-0.9.6/baidubce/services/vcr → bce_python_sdk-0.9.9/baidubce/services/subnet}/__init__.py +0 -0
  164. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/subnet/subnet_client.py +0 -0
  165. {bce-python-sdk-0.9.6/baidubce/services/vpc → bce_python_sdk-0.9.9/baidubce/services/tsdb}/__init__.py +0 -0
  166. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/tsdb/tsdb_admin_client.py +0 -0
  167. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/tsdb/tsdb_client.py +0 -0
  168. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/tsdb/tsdb_handler.py +0 -0
  169. {bce-python-sdk-0.9.6/baidubce/services/vpn → bce_python_sdk-0.9.9/baidubce/services/vca}/__init__.py +0 -0
  170. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vca/vca_client.py +0 -0
  171. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vcr/vcr_client.py +0 -0
  172. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vpc/acl_client.py +0 -0
  173. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vpc/nat_client.py +0 -0
  174. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vpc/nat_model.py +0 -0
  175. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vpc/peerconn_client.py +0 -0
  176. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vpc/peerconn_model.py +0 -0
  177. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vpc/vpc_client.py +0 -0
  178. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vpn/vpn_client.py +0 -0
  179. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/services/vpn/vpn_model.py +0 -0
  180. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/baidubce/utils.py +0 -0
  181. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/bce_python_sdk.egg-info/dependency_links.txt +0 -0
  182. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/bce_python_sdk.egg-info/requires.txt +0 -0
  183. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/bce_python_sdk.egg-info/top_level.txt +0 -0
  184. {bce-python-sdk-0.9.6 → bce_python_sdk-0.9.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bce-python-sdk
3
- Version: 0.9.6
3
+ Version: 0.9.9
4
4
  Summary: BCE SDK for python
5
5
  Home-page: http://bce.baidu.com
6
6
  Author:
@@ -18,7 +18,7 @@ from builtins import bytes
18
18
  from . import protocol
19
19
 
20
20
 
21
- SDK_VERSION = b'0.9.06'
21
+ SDK_VERSION = b'0.9.09'
22
22
  DEFAULT_SERVICE_DOMAIN = b'bcebos.com'
23
23
  URL_PREFIX = b'/v1'
24
24
  DEFAULT_ENCODING = 'UTF-8'
@@ -41,6 +41,7 @@ class BbcClient(bce_base_client.BceBaseClient):
41
41
  Bbc client sdk
42
42
  """
43
43
 
44
+ prefix_v2 = b'/v2'
44
45
  def __init__(self, config=None):
45
46
  bce_base_client.BceBaseClient.__init__(self, config)
46
47
 
@@ -685,6 +686,47 @@ class BbcClient(bce_base_client.BceBaseClient):
685
686
  return self._send_request(http_methods.PUT, path, body=json.dumps(body),
686
687
  params=params, config=config)
687
688
 
689
+ @required(reserved_instance_ids=list,
690
+ tags=list)
691
+ def bind_reserved_instance_to_tags(self, reserved_instance_ids, tags, config=None):
692
+ """
693
+ :param reserved_instance_ids:
694
+ :param tags:
695
+ :param config:
696
+ :return:
697
+ """
698
+ path = b'/bbc/reserved/tag'
699
+ tag_list = [tag.__dict__ for tag in tags]
700
+ body = {
701
+ 'changeTags': tag_list,
702
+ 'reservedInstanceIds': reserved_instance_ids
703
+ }
704
+ params = {
705
+ 'bind': None
706
+ }
707
+ return self._send_request(http_methods.PUT, path, json.dumps(body),
708
+ params=params, config=config, api_version=self.prefix_v2)
709
+
710
+ @required(reserved_instance_ids=list,
711
+ tags=list)
712
+ def unbind_reserved_instance_from_tags(self, reserved_instance_ids, tags, config=None):
713
+ """
714
+ :param reserved_instance_ids:
715
+ :param tags:
716
+ :param config:
717
+ :return:
718
+ """
719
+ path = b'/bbc/reserved/tag'
720
+ tag_list = [tag.__dict__ for tag in tags]
721
+ body = {
722
+ 'changeTags': tag_list,
723
+ 'reservedInstanceIds': reserved_instance_ids
724
+ }
725
+ params = {
726
+ 'unbind': None
727
+ }
728
+ return self._send_request(http_methods.PUT, path, json.dumps(body),
729
+ params=params, config=config, api_version=self.prefix_v2)
688
730
 
689
731
  def list_flavors(self, config=None):
690
732
  """
@@ -32,10 +32,21 @@ class Billing(object):
32
32
  param: reservationTimeUnit:
33
33
  The time unit to specify the duration ,only "Month" can be used now.
34
34
  """
35
+
35
36
  def __init__(self, paymentTiming=None, reservationLength=1, reservationTimeUnit='Month'):
36
37
  if paymentTiming:
37
38
  self.paymentTiming = paymentTiming
38
39
  self.reservation = {
39
- 'reservationLength': reservationLength,
40
- 'reservationTimeUnit': reservationTimeUnit
41
- }
40
+ 'reservationLength': reservationLength,
41
+ 'reservationTimeUnit': reservationTimeUnit
42
+ }
43
+
44
+
45
+ class TagModel(object):
46
+ """
47
+ TAGModel
48
+ """
49
+
50
+ def __init__(self, tagKey=None, tagValue=None):
51
+ self.tagKey = tagKey
52
+ self.tagValue = tagValue
@@ -50,6 +50,7 @@ class BccClient(bce_base_client.BceBaseClient):
50
50
  """
51
51
 
52
52
  prefix = b'/v2'
53
+ prefix_v3 = b'/v3'
53
54
 
54
55
  def __init__(self, config=None):
55
56
  bce_base_client.BceBaseClient.__init__(self, config)
@@ -1065,7 +1066,7 @@ class BccClient(bce_base_client.BceBaseClient):
1065
1066
  def list_instances(self, marker=None, max_keys=None, internal_ip=None, dedicated_host_id=None,
1066
1067
  zone_name=None, instance_ids=None, instance_names=None, cds_ids=None,
1067
1068
  deployset_ids=None, security_group_ids=None, payment_timing=None, status=None, tags=None,
1068
- vpc_id=None, private_ips=None, auto_renew=None, config=None):
1069
+ vpc_id=None, private_ips=None, ipv6_addresses=None, auto_renew=None, config=None):
1069
1070
  """
1070
1071
  Return a list of instances owned by the authenticated user.
1071
1072
 
@@ -1135,6 +1136,11 @@ class BccClient(bce_base_client.BceBaseClient):
1135
1136
  vpc_id
1136
1137
  :type private_ips: string
1137
1138
 
1139
+ :param ipv6_addresses:
1140
+ filter instance list with multiple ipv6 private ips join by ',', the parameter should be used with
1141
+ vpc_id
1142
+ :type ipv6_addresses: string
1143
+
1138
1144
  :param auto_renew:
1139
1145
  :type auto_renew: boolean
1140
1146
 
@@ -1174,6 +1180,8 @@ class BccClient(bce_base_client.BceBaseClient):
1174
1180
  params['vpcId'] = vpc_id
1175
1181
  if private_ips is not None:
1176
1182
  params['privateIps'] = private_ips
1183
+ if ipv6_addresses is not None:
1184
+ params['ipv6Addresses'] = ipv6_addresses
1177
1185
  if auto_renew is not None:
1178
1186
  params['autoRenew'] = auto_renew
1179
1187
  return self._send_request(http_methods.GET, path, params=params, config=config)
@@ -1640,6 +1648,94 @@ class BccClient(bce_base_client.BceBaseClient):
1640
1648
  return self._send_request(http_methods.PUT, path, json.dumps(body),
1641
1649
  params=params, config=config)
1642
1650
 
1651
+ @required(reserved_instance_ids=list,
1652
+ tags=list)
1653
+ def bind_reserved_instance_to_tags(self, reserved_instance_ids, tags, config=None):
1654
+ """
1655
+ :param reserved_instance_ids:
1656
+ :param tags:
1657
+ :param config:
1658
+ :return:
1659
+ """
1660
+ path = b'/bcc/reserved/tag'
1661
+ tag_list = [tag.__dict__ for tag in tags]
1662
+ body = {
1663
+ 'changeTags': tag_list,
1664
+ 'reservedInstanceIds': reserved_instance_ids
1665
+ }
1666
+ params = {
1667
+ 'bind': None
1668
+ }
1669
+ return self._send_request(http_methods.PUT, path, json.dumps(body),
1670
+ params=params, config=config)
1671
+
1672
+ @required(reserved_instance_ids=list,
1673
+ tags=list)
1674
+ def unbind_reserved_instance_from_tags(self, reserved_instance_ids, tags, config=None):
1675
+ """
1676
+ :param reserved_instance_ids:
1677
+ :param tags:
1678
+ :param config:
1679
+ :return:
1680
+ """
1681
+ path = b'/bcc/reserved/tag'
1682
+ tag_list = [tag.__dict__ for tag in tags]
1683
+ body = {
1684
+ 'changeTags': tag_list,
1685
+ 'reservedInstanceIds': reserved_instance_ids
1686
+ }
1687
+ params = {
1688
+ 'unbind': None
1689
+ }
1690
+ return self._send_request(http_methods.PUT, path, json.dumps(body),
1691
+ params=params, config=config)
1692
+
1693
+ def bind_tags_batch_by_resource_type(self, resource_type, resource_ids, tags, is_relation_tag, config=None):
1694
+ """
1695
+ :param resource_type:
1696
+ :param resource_ids:
1697
+ :param tags:
1698
+ :param is_relation_tag:
1699
+ :param config:
1700
+ :return:
1701
+ """
1702
+ path = b'/bcc/tag'
1703
+ tag_list = [tag.__dict__ for tag in tags]
1704
+ body = {
1705
+ 'resourceType': resource_type,
1706
+ 'resourceIds': resource_ids,
1707
+ 'tags': tag_list,
1708
+ 'isRelationTag': is_relation_tag
1709
+ }
1710
+ params = {
1711
+ 'action': 'AttachTags'
1712
+ }
1713
+ return self._send_request(http_methods.POST, path, json.dumps(body),
1714
+ params=params, config=config, prefix=self.prefix_v3)
1715
+
1716
+ def unbind_tags_batch_by_resource_type(self, resource_type, resource_ids, tags, is_relation_tag, config=None):
1717
+ """
1718
+ :param resource_type:
1719
+ :param resource_ids:
1720
+ :param tags:
1721
+ :param is_relation_tag:
1722
+ :param config:
1723
+ :return:
1724
+ """
1725
+ path = b'/bcc/tag'
1726
+ tag_list = [tag.__dict__ for tag in tags]
1727
+ body = {
1728
+ 'resourceType': resource_type,
1729
+ 'resourceIds': resource_ids,
1730
+ 'tags': tag_list,
1731
+ 'isRelationTag': is_relation_tag
1732
+ }
1733
+ params = {
1734
+ 'action': 'DetachTags'
1735
+ }
1736
+ return self._send_request(http_methods.POST, path, json.dumps(body),
1737
+ params=params, config=config, prefix=self.prefix_v3)
1738
+
1643
1739
  @required(instance_id=(bytes, str),
1644
1740
  tags=list)
1645
1741
  def bind_instance_to_tags(self, instance_id, tags, config=None):
@@ -4292,6 +4388,52 @@ class BccClient(bce_base_client.BceBaseClient):
4292
4388
  }
4293
4389
  return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
4294
4390
 
4391
+ @required(instance_ids=(list))
4392
+ def batch_refund_resources(self, instance_ids, related_release_flag=None,
4393
+ delete_cds_snapshot_flag=None, delete_related_enis_flag=None,
4394
+ client_token=None, config=None):
4395
+ """
4396
+ Releasing the instance owned by the user.
4397
+ Only the Prepaid instance and the instance has not expired can be released.
4398
+ After releasing the instance, all of the data will be deleted.
4399
+
4400
+ :param instance_ids:
4401
+ The id list of instances.
4402
+ :type instance_ids: list of string
4403
+
4404
+
4405
+ :param related_release_flag:
4406
+ Release or not related resources.
4407
+ :type related_release_flag: bool
4408
+
4409
+ :param delete_cds_snapshot_flag:
4410
+ Delete or not cds snapshot.
4411
+ :type delete_cds_snapshot_flag: bool
4412
+
4413
+ :param delete_related_enis_flag:
4414
+ Delete or not related enis.
4415
+ :type delete_related_enis_flag: bool
4416
+
4417
+ :return:
4418
+ :rtype baidubce.bce_response.BceResponse
4419
+ """
4420
+ params = {}
4421
+ if client_token is None:
4422
+ params['clientToken'] = generate_client_token()
4423
+ else:
4424
+ params['clientToken'] = client_token
4425
+ path = b'/instance/batchRefundResource'
4426
+ body = {
4427
+ "instanceIds": instance_ids
4428
+ }
4429
+ if related_release_flag is not None:
4430
+ body['relatedReleaseFlag'] = related_release_flag
4431
+ if delete_cds_snapshot_flag is not None:
4432
+ body['deleteCdsSnapshotFlag'] = delete_cds_snapshot_flag
4433
+ if delete_related_enis_flag is not None:
4434
+ body['deleteRelatedEnisFlag'] = delete_related_enis_flag
4435
+ return self._send_request(http_methods.POST, path, body=json.dumps(body), params=params, config=config)
4436
+
4295
4437
  @required(instance_type=str, cpu_count=int, memory_cap_in_gb=int) # ***Unicode***
4296
4438
  def get_bid_instance_price(self, instance_type, cpu_count, memory_cap_in_gb,
4297
4439
  root_disk_size_in_gb=None, root_disk_storage_type=None, create_cds_list=None,
@@ -5872,3 +5872,79 @@ class BcmClient(bce_base_client.BceBaseClient):
5872
5872
  return self._send_csm_request(http_methods.POST, path, version=b'/v2', body=json.dumps(body))
5873
5873
 
5874
5874
 
5875
+ def get_metric_dimension_top(self, user_id, scope, region, dimensions, metric_name, statistics, labels,
5876
+ start_time, end_time, order="top", topNum=10):
5877
+
5878
+ """
5879
+ :param user_id: user_id
5880
+ :type string
5881
+
5882
+ :param scope: scope
5883
+ :type string
5884
+
5885
+ :param region: region
5886
+ :type string
5887
+
5888
+ :param dimensions: dimensions
5889
+ :type map
5890
+
5891
+ :param metric_name: metric_name
5892
+ :type string
5893
+
5894
+ :param statistics: statistics
5895
+ :type string
5896
+
5897
+ :param labels: labels
5898
+ :type set
5899
+
5900
+ :param start_time: start_time
5901
+ :type string
5902
+
5903
+ :param end_time: end_time
5904
+ :type string
5905
+
5906
+ :param order: order default top
5907
+ :type string
5908
+
5909
+ :param topNum: topNum default 10
5910
+ :type int
5911
+
5912
+ :return:
5913
+ """
5914
+ if len(user_id) <= 0:
5915
+ raise ValueError("user_id should not be null")
5916
+ if len(scope) <= 0:
5917
+ raise ValueError("scope should not be null")
5918
+ if len(region) <= 0:
5919
+ raise ValueError("region should not be null")
5920
+ if len(metric_name) <= 0:
5921
+ raise ValueError("metric_name should not be null")
5922
+ if len(dimensions) <= 0:
5923
+ raise ValueError("dimensions should not be null")
5924
+ if len(labels) <= 0:
5925
+ raise ValueError("lables should not be null")
5926
+ if len(statistics) <= 0:
5927
+ raise ValueError("statistics should not be null")
5928
+ if len(start_time) <= 0:
5929
+ raise ValueError("start_time should not be null")
5930
+ if len(end_time) <= 0:
5931
+ raise ValueError("end_time should not be null")
5932
+
5933
+ body = {
5934
+ "userId": user_id,
5935
+ "scope": scope,
5936
+ "region": region,
5937
+ "startTime": start_time,
5938
+ "endTime": end_time,
5939
+ "metricName": metric_name,
5940
+ "dimensions": dimensions,
5941
+ "statistics": statistics,
5942
+ "labels": labels,
5943
+ "order": order,
5944
+ "topNum": topNum,
5945
+ }
5946
+
5947
+ path = b'/dimensions/top'
5948
+ return self._send_csm_request(http_methods.POST, path, version=b'/v2', body=json.dumps(body))
5949
+
5950
+
@@ -0,0 +1,307 @@
1
+ # Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
4
+ # except in compliance with the License. You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software distributed under the
9
+ # License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
10
+ # either express or implied. See the License for the specific language governing permissions
11
+ # and limitations under the License.
12
+
13
+ """
14
+ This module provides a client class for esg.
15
+ """
16
+ from __future__ import unicode_literals
17
+
18
+ import copy
19
+ import json
20
+ import uuid
21
+
22
+ from baidubce import bce_base_client
23
+ from baidubce import compat
24
+ from baidubce.auth import bce_v1_signer
25
+ from baidubce.http import bce_http_client
26
+ from baidubce.http import handler
27
+ from baidubce.http import http_methods
28
+ from baidubce.services.esg import esg_model
29
+ from baidubce.utils import required
30
+
31
+
32
+ class EsgClient(bce_base_client.BceBaseClient):
33
+ """
34
+ Bcc base sdk client
35
+ """
36
+
37
+ prefix = b'/v1'
38
+
39
+ def __init__(self, config=None):
40
+ bce_base_client.BceBaseClient.__init__(self, config)
41
+
42
+ def _merge_config(self, config=None):
43
+ if config is None:
44
+ return self.config
45
+ else:
46
+ new_config = copy.copy(self.config)
47
+ new_config.merge_non_none_values(config)
48
+ return new_config
49
+
50
+ def _send_request(self, http_method, path,
51
+ body=None, headers=None, params=None,
52
+ config=None, body_parser=None, prefix=None):
53
+ config = self._merge_config(config)
54
+ if body_parser is None:
55
+ body_parser = handler.parse_json
56
+ if prefix is None:
57
+ prefix = EsgClient.prefix
58
+
59
+ return bce_http_client.send_request(
60
+ config, bce_v1_signer.sign, [handler.parse_error, body_parser],
61
+ http_method, prefix + path, body, headers, params)
62
+
63
+ @required(name=(bytes, str), # ***Unicode***
64
+ rules=list)
65
+ def create_enterprise_security_group(self, name, rules=None,
66
+ desc=None,
67
+ tags=None,
68
+ client_token=None,
69
+ config=None):
70
+ """
71
+ Creating a newly esg with specified rules.
72
+
73
+ :param name:
74
+ The name of esg that will be created.
75
+ :type name: string
76
+
77
+ :param rules:
78
+ The list of rules which define how the esg works.
79
+ :type rules: list<esg_model.EnterpriseSecurityGroupRuleModel>
80
+
81
+ :param desc:
82
+ The optional parameter to describe the esg that will be created.
83
+ :type desc: string
84
+
85
+ :param tags:
86
+ The optional list of tag to be bonded.
87
+ :type tags: list<esg_model.TagModel>
88
+
89
+ :param client_token:
90
+ An ASCII string whose length is less than 64.
91
+ The request will be idempotent if client token is provided.
92
+ If the clientToken is not specified by the user,
93
+ a random String generated by default algorithm will be used.
94
+ :type client_token: string
95
+
96
+ :param config:
97
+ :type config: baidubce.BceClientConfiguration
98
+
99
+ :return:
100
+ :rtype baidubce.bce_response.BceResponse
101
+ """
102
+ path = b'/enterprise/security'
103
+ params = {
104
+ 'clientToken': generate_client_token() if client_token is None else client_token
105
+ }
106
+ rule_list = [rule.__dict__ for rule in rules]
107
+ body = {
108
+ 'name': name,
109
+ 'desc': desc,
110
+ 'rules': rule_list
111
+ }
112
+ if desc is not None:
113
+ body['desc'] = desc
114
+ if tags is not None:
115
+ tag_list = [tag.__dict__ for tag in tags]
116
+ body['tags'] = tag_list
117
+ return self._send_request(http_methods.POST, path, json.dumps(body), params=params, config=config)
118
+
119
+ def list_enterprise_security_groups(self, instance_id=None, marker=None, max_keys=None, config=None):
120
+ """
121
+ Listing EnterpriseSecurityGroup owned by the authenticated user.
122
+
123
+ :param instance_id:
124
+ The id of instance. The optional parameter to list the SecurityGroup.
125
+ If it's specified,only the SecurityGroup related to the specified instance will be listed
126
+ :type instance_id: string
127
+
128
+ :param marker:
129
+ The optional parameter marker specified in the original request to specify
130
+ where in the results to begin listing.
131
+ Together with the marker, specifies the list result which listing should begin.
132
+ If the marker is not specified, the list result will listing from the first one.
133
+ :type marker: string
134
+
135
+ :param max_keys:
136
+ The optional parameter to specifies the max number of list result to return.
137
+ The default value is 1000.
138
+ :type max_keys: int
139
+
140
+ :param config:
141
+ :type config: baidubce.BceClientConfiguration
142
+
143
+ :return:
144
+ :rtype baidubce.bce_response.BceResponse
145
+ """
146
+ path = b'/enterprise/security'
147
+ params = {}
148
+ if instance_id is not None:
149
+ params['instanceId'] = instance_id
150
+ if marker is not None:
151
+ params['marker'] = marker
152
+ if max_keys is not None:
153
+ params['maxKeys'] = max_keys
154
+
155
+ return self._send_request(http_methods.GET, path, params=params, config=config)
156
+
157
+ @required(enterprise_security_group_id=(bytes, str)) # ***Unicode***
158
+ def delete_enterprise_security_group(self, enterprise_security_group_id, config=None):
159
+ """
160
+ Deleting the specified EnterpriseSecurityGroup.
161
+
162
+ :param enterprise_security_group_id:
163
+ The id of SecurityGroup that will be deleted.
164
+ :type enterprise_security_group_id: string
165
+
166
+ :param config:
167
+ :type config: baidubce.BceClientConfiguration
168
+ :return:
169
+ :rtype baidubce.bce_response.BceResponse
170
+ """
171
+ enterprise_security_group_id = compat.convert_to_bytes(enterprise_security_group_id)
172
+ path = b'/enterprise/security/%s' % enterprise_security_group_id
173
+ return self._send_request(http_methods.DELETE, path, config=config)
174
+
175
+ @required(enterprise_security_group_id=(bytes, str), # ***Unicode***
176
+ rule=esg_model.EnterpriseSecurityGroupRuleModel)
177
+ def authorize_enterprise_security_group_rule(self, enterprise_security_group_id, rules,
178
+ client_token=None,
179
+ config=None):
180
+ """
181
+ authorize a security group rule to the specified security group
182
+
183
+ :param enterprise_security_group_id:
184
+ The id of EnterpriseSecurityGroup that will be authorized.
185
+ :type enterprise_security_group_id: string
186
+
187
+ :param rules:
188
+ The list of rules which define how the esg works.
189
+ :type rules: list<esg_model.EnterpriseSecurityGroupRuleModel>
190
+
191
+ :param client_token:
192
+ An ASCII string whose length is less than 64.
193
+ The request will be idempotent if client token is provided.
194
+ If the clientToken is not specified by the user,
195
+ a random String generated by default algorithm will be used.
196
+ :type client_token: string
197
+
198
+ :param config:
199
+ :type config: baidubce.BceClientConfiguration
200
+
201
+ :return:
202
+ :rtype baidubce.bce_response.BceResponse
203
+ """
204
+ enterprise_security_group_id = compat.convert_to_bytes(enterprise_security_group_id)
205
+ path = b'/enterprise/security/%s' % enterprise_security_group_id
206
+ params = {'authorizeRule': ''}
207
+ if client_token is None:
208
+ params['clientToken'] = generate_client_token()
209
+ else:
210
+ params['clientToken'] = client_token
211
+ rule_list = [rule.__dict__ for rule in rules]
212
+ body = {
213
+ 'rules': rule_list
214
+ }
215
+ return self._send_request(http_methods.PUT, path, json.dumps(body), params=params, config=config)
216
+
217
+ @required(enterprise_security_group_rule_id=(bytes, str)) # ***Unicode***
218
+ def update_enterprise_security_group_rule(self, enterprise_security_group_rule_id,
219
+ remark=None,
220
+ protocol=None,
221
+ portrange=None,
222
+ source_ip=None,
223
+ dest_ip=None,
224
+ action=None,
225
+ local_ip=None,
226
+ priority=None,
227
+ source_portrange=None,
228
+ config=None):
229
+ """
230
+ uodate a enterprise security group rule from the specified security group
231
+ :param enterprise_security_group_rule_id:
232
+ The id of EnterpriseSecurityGroupRule that will be updated.
233
+ :param: remark:
234
+ The remark for the rule.
235
+ :param: portrange:
236
+ The port range to specify the port which the rule will work on.
237
+ Available range is rang [0, 65535], the fault value is "" for all port.
238
+ :param: source_portrange:
239
+ The source port range to specify the port which the rule will work on.
240
+ Available range is rang [0, 65535], the fault value is "" for all port.
241
+ :param: protocol:
242
+ The parameter specify which protocol will the rule work on, the fault value is "" for all protocol.
243
+ Available protocol are tcp, udp and icmp.
244
+ :param: source_ip:
245
+ The source ip range with CIDR formats. The default value 0.0.0.0/0 (allow all ip address),
246
+ other supported formats such as {ip_addr}/12 or {ip_addr}. Only supports IPV4.
247
+ Only works for direction = "ingress".
248
+ :param: dest_ip:
249
+ The destination ip range with CIDR formats. The default value 0.0.0.0/0 (allow all ip address),
250
+ other supported formats such as {ip_addr}/12 or {ip_addr}. Only supports IPV4.
251
+ Only works for direction = "egress".
252
+ :param: local_ip:
253
+ The parameter specify the localIP (allow all ip address: all).
254
+ :param: priority:
255
+ The parameter specify the priority of the rule(range 1-1000).
256
+ :param: action:
257
+ The parameter specify the action of the rule, available value are "allow/deny".
258
+ :param config:
259
+ :type config: baidubce.BceClientConfiguration
260
+ :return:
261
+ :rtype baidubce.bce_response.BceResponse
262
+ """
263
+ enterprise_security_group_rule_id = compat.convert_to_bytes(enterprise_security_group_rule_id)
264
+ path = b'/enterprise/security/rule/%s' % enterprise_security_group_rule_id
265
+ body = {
266
+ 'enterpriseSecurityGroupRuleId': enterprise_security_group_rule_id,
267
+ 'remark': remark,
268
+ 'protocol': protocol,
269
+ 'portRange': portrange,
270
+ 'sourceIp': source_ip,
271
+ 'destIp': dest_ip,
272
+ 'action': action,
273
+ 'localIp': local_ip,
274
+ 'priority': priority,
275
+ 'sourcePortRange': source_portrange
276
+ }
277
+ return self._send_request(http_methods.PUT, path, json.dumps(body), params=None, config=config)
278
+
279
+ @required(enterprise_security_group_rule_id=(bytes, str)) # ***Unicode***
280
+ def delete_enterprise_security_group_rule(self, enterprise_security_group_rule_id, config=None):
281
+ """
282
+ delete a enterprise security group rule from the specified security group
283
+ :param enterprise_security_group_rule_id:
284
+ The id of EnterpriseSecurityGroupRule that will be deleted.
285
+ :type enterprise_security_group_id: string
286
+
287
+ :param config:
288
+ :type config: baidubce.BceClientConfiguration
289
+ :return:
290
+ :rtype baidubce.bce_response.BceResponse
291
+ """
292
+ enterprise_security_group_rule_id = compat.convert_to_bytes(enterprise_security_group_rule_id)
293
+ path = b'/enterprise/security/rule/%s' % enterprise_security_group_rule_id
294
+ return self._send_request(http_methods.DELETE, path, params=None, config=config)
295
+
296
+
297
+ def generate_client_token_by_uuid():
298
+ """
299
+ The default method to generate the random string for client_token
300
+ if the optional parameter client_token is not specified by the user.
301
+ :return:
302
+ :rtype string
303
+ """
304
+ return str(uuid.uuid4())
305
+
306
+
307
+ generate_client_token = generate_client_token_by_uuid