azure_key_vault 0.17.2 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (376) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-01/generated/azure_key_vault/key_vault_client.rb +157 -45
  3. data/lib/2015-06-01/generated/azure_key_vault/models/administrator_details.rb +1 -1
  4. data/lib/2015-06-01/generated/azure_key_vault/models/attributes.rb +4 -4
  5. data/lib/2015-06-01/generated/azure_key_vault/models/certificate_import_parameters.rb +1 -1
  6. data/lib/2015-06-01/generated/azure_key_vault/models/contact.rb +1 -1
  7. data/lib/2015-06-01/generated/azure_key_vault/models/issuer_attributes.rb +2 -2
  8. data/lib/2015-06-01/generated/azure_key_vault/models/x509certificate_properties.rb +1 -1
  9. data/lib/2016-10-01/generated/azure_key_vault/key_vault_client.rb +243 -61
  10. data/lib/2016-10-01/generated/azure_key_vault/models/administrator_details.rb +1 -1
  11. data/lib/2016-10-01/generated/azure_key_vault/models/certificate_import_parameters.rb +1 -1
  12. data/lib/2016-10-01/generated/azure_key_vault/models/contact.rb +1 -1
  13. data/lib/2016-10-01/generated/azure_key_vault/models/sas_definition_list_result.rb +1 -1
  14. data/lib/2016-10-01/generated/azure_key_vault/models/x509certificate_properties.rb +1 -1
  15. data/lib/7.0-preview/generated/azure_key_vault/key_vault_client.rb +279 -67
  16. data/lib/7.0-preview/generated/azure_key_vault/models/administrator_details.rb +1 -1
  17. data/lib/7.0-preview/generated/azure_key_vault/models/certificate_import_parameters.rb +1 -1
  18. data/lib/7.0-preview/generated/azure_key_vault/models/contact.rb +1 -1
  19. data/lib/7.0-preview/generated/azure_key_vault/models/issuer_parameters.rb +2 -2
  20. data/lib/7.0-preview/generated/azure_key_vault/models/sas_definition_list_result.rb +1 -1
  21. data/lib/7.0-preview/generated/azure_key_vault/models/x509certificate_properties.rb +1 -1
  22. data/lib/7.0/generated/azure_key_vault/key_vault_client.rb +305 -84
  23. data/lib/7.0/generated/azure_key_vault/models/administrator_details.rb +1 -1
  24. data/lib/7.0/generated/azure_key_vault/models/certificate_attributes.rb +2 -1
  25. data/lib/7.0/generated/azure_key_vault/models/certificate_import_parameters.rb +3 -3
  26. data/lib/7.0/generated/azure_key_vault/models/contact.rb +1 -1
  27. data/lib/7.0/generated/azure_key_vault/models/deletion_recovery_level.rb +3 -0
  28. data/lib/7.0/generated/azure_key_vault/models/issuer_parameters.rb +2 -2
  29. data/lib/7.0/generated/azure_key_vault/models/key_attributes.rb +2 -1
  30. data/lib/7.0/generated/azure_key_vault/models/sas_definition_attributes.rb +2 -1
  31. data/lib/7.0/generated/azure_key_vault/models/sas_definition_list_result.rb +1 -1
  32. data/lib/7.0/generated/azure_key_vault/models/secret_attributes.rb +2 -1
  33. data/lib/7.0/generated/azure_key_vault/models/storage_account_attributes.rb +2 -1
  34. data/lib/7.0/generated/azure_key_vault/models/x509certificate_properties.rb +1 -1
  35. data/lib/7.1-preview/generated/azure_key_vault.rb +125 -0
  36. data/lib/7.1-preview/generated/azure_key_vault/key_vault_client.rb +12662 -0
  37. data/lib/7.1-preview/generated/azure_key_vault/models/action.rb +48 -0
  38. data/lib/7.1-preview/generated/azure_key_vault/models/action_type.rb +16 -0
  39. data/lib/7.1-preview/generated/azure_key_vault/models/administrator_details.rb +79 -0
  40. data/lib/7.1-preview/generated/azure_key_vault/models/attributes.rb +92 -0
  41. data/lib/7.1-preview/generated/azure_key_vault/models/backup_certificate_result.rb +47 -0
  42. data/lib/7.1-preview/generated/azure_key_vault/models/backup_key_result.rb +47 -0
  43. data/lib/7.1-preview/generated/azure_key_vault/models/backup_secret_result.rb +47 -0
  44. data/lib/7.1-preview/generated/azure_key_vault/models/backup_storage_result.rb +47 -0
  45. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_attributes.rb +109 -0
  46. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_bundle.rb +151 -0
  47. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_create_parameters.rb +80 -0
  48. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_import_parameters.rb +104 -0
  49. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_issuer_item.rb +57 -0
  50. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_issuer_list_result.rb +102 -0
  51. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_issuer_set_parameters.rb +83 -0
  52. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_issuer_update_parameters.rb +83 -0
  53. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_item.rb +89 -0
  54. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_list_result.rb +102 -0
  55. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_merge_parameters.rb +88 -0
  56. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_operation.rb +142 -0
  57. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_operation_update_parameter.rb +47 -0
  58. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_policy.rb +131 -0
  59. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_restore_parameters.rb +46 -0
  60. data/lib/7.1-preview/generated/azure_key_vault/models/certificate_update_parameters.rb +80 -0
  61. data/lib/7.1-preview/generated/azure_key_vault/models/contact.rb +68 -0
  62. data/lib/7.1-preview/generated/azure_key_vault/models/contacts.rb +67 -0
  63. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_certificate_bundle.rb +159 -0
  64. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_certificate_item.rb +113 -0
  65. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_certificate_list_result.rb +102 -0
  66. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_key_bundle.rb +115 -0
  67. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_key_item.rb +114 -0
  68. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_key_list_result.rb +102 -0
  69. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_sas_definition_bundle.rb +145 -0
  70. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_sas_definition_item.rb +118 -0
  71. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_sas_definition_list_result.rb +103 -0
  72. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_secret_bundle.rb +139 -0
  73. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_secret_item.rb +121 -0
  74. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_secret_list_result.rb +102 -0
  75. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_storage_account_item.rb +118 -0
  76. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_storage_bundle.rb +146 -0
  77. data/lib/7.1-preview/generated/azure_key_vault/models/deleted_storage_list_result.rb +103 -0
  78. data/lib/7.1-preview/generated/azure_key_vault/models/deletion_recovery_level.rb +21 -0
  79. data/lib/7.1-preview/generated/azure_key_vault/models/error.rb +72 -0
  80. data/lib/7.1-preview/generated/azure_key_vault/models/issuer_attributes.rb +70 -0
  81. data/lib/7.1-preview/generated/azure_key_vault/models/issuer_bundle.rb +95 -0
  82. data/lib/7.1-preview/generated/azure_key_vault/models/issuer_credentials.rb +57 -0
  83. data/lib/7.1-preview/generated/azure_key_vault/models/issuer_parameters.rb +71 -0
  84. data/lib/7.1-preview/generated/azure_key_vault/models/json_web_key.rb +223 -0
  85. data/lib/7.1-preview/generated/azure_key_vault/models/json_web_key_curve_name.rb +18 -0
  86. data/lib/7.1-preview/generated/azure_key_vault/models/json_web_key_encryption_algorithm.rb +17 -0
  87. data/lib/7.1-preview/generated/azure_key_vault/models/json_web_key_operation.rb +21 -0
  88. data/lib/7.1-preview/generated/azure_key_vault/models/json_web_key_signature_algorithm.rb +25 -0
  89. data/lib/7.1-preview/generated/azure_key_vault/models/json_web_key_type.rb +19 -0
  90. data/lib/7.1-preview/generated/azure_key_vault/models/key_attributes.rb +109 -0
  91. data/lib/7.1-preview/generated/azure_key_vault/models/key_bundle.rb +92 -0
  92. data/lib/7.1-preview/generated/azure_key_vault/models/key_create_parameters.rb +127 -0
  93. data/lib/7.1-preview/generated/azure_key_vault/models/key_import_parameters.rb +91 -0
  94. data/lib/7.1-preview/generated/azure_key_vault/models/key_item.rb +91 -0
  95. data/lib/7.1-preview/generated/azure_key_vault/models/key_list_result.rb +101 -0
  96. data/lib/7.1-preview/generated/azure_key_vault/models/key_operation_result.rb +59 -0
  97. data/lib/7.1-preview/generated/azure_key_vault/models/key_operations_parameters.rb +61 -0
  98. data/lib/7.1-preview/generated/azure_key_vault/models/key_properties.rb +96 -0
  99. data/lib/7.1-preview/generated/azure_key_vault/models/key_restore_parameters.rb +46 -0
  100. data/lib/7.1-preview/generated/azure_key_vault/models/key_sign_parameters.rb +64 -0
  101. data/lib/7.1-preview/generated/azure_key_vault/models/key_update_parameters.rb +87 -0
  102. data/lib/7.1-preview/generated/azure_key_vault/models/key_usage_type.rb +23 -0
  103. data/lib/7.1-preview/generated/azure_key_vault/models/key_vault_error.rb +48 -0
  104. data/lib/7.1-preview/generated/azure_key_vault/models/key_verify_parameters.rb +75 -0
  105. data/lib/7.1-preview/generated/azure_key_vault/models/key_verify_result.rb +47 -0
  106. data/lib/7.1-preview/generated/azure_key_vault/models/lifetime_action.rb +60 -0
  107. data/lib/7.1-preview/generated/azure_key_vault/models/organization_details.rb +67 -0
  108. data/lib/7.1-preview/generated/azure_key_vault/models/pending_certificate_signing_request_result.rb +48 -0
  109. data/lib/7.1-preview/generated/azure_key_vault/models/sas_definition_attributes.rb +102 -0
  110. data/lib/7.1-preview/generated/azure_key_vault/models/sas_definition_bundle.rb +134 -0
  111. data/lib/7.1-preview/generated/azure_key_vault/models/sas_definition_create_parameters.rb +104 -0
  112. data/lib/7.1-preview/generated/azure_key_vault/models/sas_definition_item.rb +94 -0
  113. data/lib/7.1-preview/generated/azure_key_vault/models/sas_definition_list_result.rb +102 -0
  114. data/lib/7.1-preview/generated/azure_key_vault/models/sas_definition_update_parameters.rb +104 -0
  115. data/lib/7.1-preview/generated/azure_key_vault/models/sas_token_type.rb +16 -0
  116. data/lib/7.1-preview/generated/azure_key_vault/models/secret_attributes.rb +109 -0
  117. data/lib/7.1-preview/generated/azure_key_vault/models/secret_bundle.rb +127 -0
  118. data/lib/7.1-preview/generated/azure_key_vault/models/secret_item.rb +103 -0
  119. data/lib/7.1-preview/generated/azure_key_vault/models/secret_list_result.rb +101 -0
  120. data/lib/7.1-preview/generated/azure_key_vault/models/secret_properties.rb +46 -0
  121. data/lib/7.1-preview/generated/azure_key_vault/models/secret_restore_parameters.rb +46 -0
  122. data/lib/7.1-preview/generated/azure_key_vault/models/secret_set_parameters.rb +89 -0
  123. data/lib/7.1-preview/generated/azure_key_vault/models/secret_update_parameters.rb +78 -0
  124. data/lib/7.1-preview/generated/azure_key_vault/models/storage_account_attributes.rb +102 -0
  125. data/lib/7.1-preview/generated/azure_key_vault/models/storage_account_create_parameters.rb +114 -0
  126. data/lib/7.1-preview/generated/azure_key_vault/models/storage_account_item.rb +94 -0
  127. data/lib/7.1-preview/generated/azure_key_vault/models/storage_account_regenerte_key_parameters.rb +46 -0
  128. data/lib/7.1-preview/generated/azure_key_vault/models/storage_account_update_parameters.rb +103 -0
  129. data/lib/7.1-preview/generated/azure_key_vault/models/storage_bundle.rb +132 -0
  130. data/lib/7.1-preview/generated/azure_key_vault/models/storage_list_result.rb +102 -0
  131. data/lib/7.1-preview/generated/azure_key_vault/models/storage_restore_parameters.rb +46 -0
  132. data/lib/7.1-preview/generated/azure_key_vault/models/subject_alternative_names.rb +92 -0
  133. data/lib/7.1-preview/generated/azure_key_vault/models/trigger.rb +65 -0
  134. data/lib/7.1-preview/generated/azure_key_vault/models/x509certificate_properties.rb +111 -0
  135. data/lib/7.1-preview/generated/azure_key_vault/module_definition.rb +8 -0
  136. data/lib/7.1/generated/azure_key_vault.rb +125 -0
  137. data/lib/7.1/generated/azure_key_vault/key_vault_client.rb +12659 -0
  138. data/lib/7.1/generated/azure_key_vault/models/action.rb +48 -0
  139. data/lib/7.1/generated/azure_key_vault/models/action_type.rb +16 -0
  140. data/lib/7.1/generated/azure_key_vault/models/administrator_details.rb +79 -0
  141. data/lib/7.1/generated/azure_key_vault/models/attributes.rb +92 -0
  142. data/lib/7.1/generated/azure_key_vault/models/backup_certificate_result.rb +47 -0
  143. data/lib/7.1/generated/azure_key_vault/models/backup_key_result.rb +47 -0
  144. data/lib/7.1/generated/azure_key_vault/models/backup_secret_result.rb +47 -0
  145. data/lib/7.1/generated/azure_key_vault/models/backup_storage_result.rb +47 -0
  146. data/lib/7.1/generated/azure_key_vault/models/certificate_attributes.rb +109 -0
  147. data/lib/7.1/generated/azure_key_vault/models/certificate_bundle.rb +151 -0
  148. data/lib/7.1/generated/azure_key_vault/models/certificate_create_parameters.rb +80 -0
  149. data/lib/7.1/generated/azure_key_vault/models/certificate_import_parameters.rb +104 -0
  150. data/lib/7.1/generated/azure_key_vault/models/certificate_issuer_item.rb +57 -0
  151. data/lib/7.1/generated/azure_key_vault/models/certificate_issuer_list_result.rb +102 -0
  152. data/lib/7.1/generated/azure_key_vault/models/certificate_issuer_set_parameters.rb +83 -0
  153. data/lib/7.1/generated/azure_key_vault/models/certificate_issuer_update_parameters.rb +83 -0
  154. data/lib/7.1/generated/azure_key_vault/models/certificate_item.rb +89 -0
  155. data/lib/7.1/generated/azure_key_vault/models/certificate_list_result.rb +102 -0
  156. data/lib/7.1/generated/azure_key_vault/models/certificate_merge_parameters.rb +88 -0
  157. data/lib/7.1/generated/azure_key_vault/models/certificate_operation.rb +142 -0
  158. data/lib/7.1/generated/azure_key_vault/models/certificate_operation_update_parameter.rb +47 -0
  159. data/lib/7.1/generated/azure_key_vault/models/certificate_policy.rb +131 -0
  160. data/lib/7.1/generated/azure_key_vault/models/certificate_restore_parameters.rb +46 -0
  161. data/lib/7.1/generated/azure_key_vault/models/certificate_update_parameters.rb +80 -0
  162. data/lib/7.1/generated/azure_key_vault/models/contact.rb +68 -0
  163. data/lib/7.1/generated/azure_key_vault/models/contacts.rb +67 -0
  164. data/lib/7.1/generated/azure_key_vault/models/deleted_certificate_bundle.rb +159 -0
  165. data/lib/7.1/generated/azure_key_vault/models/deleted_certificate_item.rb +113 -0
  166. data/lib/7.1/generated/azure_key_vault/models/deleted_certificate_list_result.rb +102 -0
  167. data/lib/7.1/generated/azure_key_vault/models/deleted_key_bundle.rb +115 -0
  168. data/lib/7.1/generated/azure_key_vault/models/deleted_key_item.rb +114 -0
  169. data/lib/7.1/generated/azure_key_vault/models/deleted_key_list_result.rb +102 -0
  170. data/lib/7.1/generated/azure_key_vault/models/deleted_sas_definition_bundle.rb +145 -0
  171. data/lib/7.1/generated/azure_key_vault/models/deleted_sas_definition_item.rb +118 -0
  172. data/lib/7.1/generated/azure_key_vault/models/deleted_sas_definition_list_result.rb +103 -0
  173. data/lib/7.1/generated/azure_key_vault/models/deleted_secret_bundle.rb +139 -0
  174. data/lib/7.1/generated/azure_key_vault/models/deleted_secret_item.rb +121 -0
  175. data/lib/7.1/generated/azure_key_vault/models/deleted_secret_list_result.rb +102 -0
  176. data/lib/7.1/generated/azure_key_vault/models/deleted_storage_account_item.rb +118 -0
  177. data/lib/7.1/generated/azure_key_vault/models/deleted_storage_bundle.rb +146 -0
  178. data/lib/7.1/generated/azure_key_vault/models/deleted_storage_list_result.rb +103 -0
  179. data/lib/7.1/generated/azure_key_vault/models/deletion_recovery_level.rb +21 -0
  180. data/lib/7.1/generated/azure_key_vault/models/error.rb +72 -0
  181. data/lib/7.1/generated/azure_key_vault/models/issuer_attributes.rb +70 -0
  182. data/lib/7.1/generated/azure_key_vault/models/issuer_bundle.rb +95 -0
  183. data/lib/7.1/generated/azure_key_vault/models/issuer_credentials.rb +57 -0
  184. data/lib/7.1/generated/azure_key_vault/models/issuer_parameters.rb +71 -0
  185. data/lib/7.1/generated/azure_key_vault/models/json_web_key.rb +223 -0
  186. data/lib/7.1/generated/azure_key_vault/models/json_web_key_curve_name.rb +18 -0
  187. data/lib/7.1/generated/azure_key_vault/models/json_web_key_encryption_algorithm.rb +17 -0
  188. data/lib/7.1/generated/azure_key_vault/models/json_web_key_operation.rb +21 -0
  189. data/lib/7.1/generated/azure_key_vault/models/json_web_key_signature_algorithm.rb +25 -0
  190. data/lib/7.1/generated/azure_key_vault/models/json_web_key_type.rb +19 -0
  191. data/lib/7.1/generated/azure_key_vault/models/key_attributes.rb +109 -0
  192. data/lib/7.1/generated/azure_key_vault/models/key_bundle.rb +92 -0
  193. data/lib/7.1/generated/azure_key_vault/models/key_create_parameters.rb +127 -0
  194. data/lib/7.1/generated/azure_key_vault/models/key_import_parameters.rb +91 -0
  195. data/lib/7.1/generated/azure_key_vault/models/key_item.rb +91 -0
  196. data/lib/7.1/generated/azure_key_vault/models/key_list_result.rb +101 -0
  197. data/lib/7.1/generated/azure_key_vault/models/key_operation_result.rb +59 -0
  198. data/lib/7.1/generated/azure_key_vault/models/key_operations_parameters.rb +61 -0
  199. data/lib/7.1/generated/azure_key_vault/models/key_properties.rb +96 -0
  200. data/lib/7.1/generated/azure_key_vault/models/key_restore_parameters.rb +46 -0
  201. data/lib/7.1/generated/azure_key_vault/models/key_sign_parameters.rb +64 -0
  202. data/lib/7.1/generated/azure_key_vault/models/key_update_parameters.rb +87 -0
  203. data/lib/7.1/generated/azure_key_vault/models/key_usage_type.rb +23 -0
  204. data/lib/7.1/generated/azure_key_vault/models/key_vault_error.rb +48 -0
  205. data/lib/7.1/generated/azure_key_vault/models/key_verify_parameters.rb +75 -0
  206. data/lib/7.1/generated/azure_key_vault/models/key_verify_result.rb +47 -0
  207. data/lib/7.1/generated/azure_key_vault/models/lifetime_action.rb +60 -0
  208. data/lib/7.1/generated/azure_key_vault/models/organization_details.rb +67 -0
  209. data/lib/7.1/generated/azure_key_vault/models/pending_certificate_signing_request_result.rb +48 -0
  210. data/lib/7.1/generated/azure_key_vault/models/sas_definition_attributes.rb +102 -0
  211. data/lib/7.1/generated/azure_key_vault/models/sas_definition_bundle.rb +134 -0
  212. data/lib/7.1/generated/azure_key_vault/models/sas_definition_create_parameters.rb +104 -0
  213. data/lib/7.1/generated/azure_key_vault/models/sas_definition_item.rb +94 -0
  214. data/lib/7.1/generated/azure_key_vault/models/sas_definition_list_result.rb +102 -0
  215. data/lib/7.1/generated/azure_key_vault/models/sas_definition_update_parameters.rb +104 -0
  216. data/lib/7.1/generated/azure_key_vault/models/sas_token_type.rb +16 -0
  217. data/lib/7.1/generated/azure_key_vault/models/secret_attributes.rb +109 -0
  218. data/lib/7.1/generated/azure_key_vault/models/secret_bundle.rb +127 -0
  219. data/lib/7.1/generated/azure_key_vault/models/secret_item.rb +103 -0
  220. data/lib/7.1/generated/azure_key_vault/models/secret_list_result.rb +101 -0
  221. data/lib/7.1/generated/azure_key_vault/models/secret_properties.rb +46 -0
  222. data/lib/7.1/generated/azure_key_vault/models/secret_restore_parameters.rb +46 -0
  223. data/lib/7.1/generated/azure_key_vault/models/secret_set_parameters.rb +89 -0
  224. data/lib/7.1/generated/azure_key_vault/models/secret_update_parameters.rb +78 -0
  225. data/lib/7.1/generated/azure_key_vault/models/storage_account_attributes.rb +102 -0
  226. data/lib/7.1/generated/azure_key_vault/models/storage_account_create_parameters.rb +114 -0
  227. data/lib/7.1/generated/azure_key_vault/models/storage_account_item.rb +94 -0
  228. data/lib/7.1/generated/azure_key_vault/models/storage_account_regenerte_key_parameters.rb +46 -0
  229. data/lib/7.1/generated/azure_key_vault/models/storage_account_update_parameters.rb +103 -0
  230. data/lib/7.1/generated/azure_key_vault/models/storage_bundle.rb +132 -0
  231. data/lib/7.1/generated/azure_key_vault/models/storage_list_result.rb +102 -0
  232. data/lib/7.1/generated/azure_key_vault/models/storage_restore_parameters.rb +46 -0
  233. data/lib/7.1/generated/azure_key_vault/models/subject_alternative_names.rb +92 -0
  234. data/lib/7.1/generated/azure_key_vault/models/trigger.rb +65 -0
  235. data/lib/7.1/generated/azure_key_vault/models/x509certificate_properties.rb +111 -0
  236. data/lib/7.1/generated/azure_key_vault/module_definition.rb +8 -0
  237. data/lib/7.2-preview/generated/azure_key_vault.rb +157 -0
  238. data/lib/7.2-preview/generated/azure_key_vault/hsmsecurity_domain.rb +619 -0
  239. data/lib/7.2-preview/generated/azure_key_vault/key_vault_client.rb +13656 -0
  240. data/lib/7.2-preview/generated/azure_key_vault/models/action.rb +48 -0
  241. data/lib/7.2-preview/generated/azure_key_vault/models/action_type.rb +16 -0
  242. data/lib/7.2-preview/generated/azure_key_vault/models/administrator_details.rb +79 -0
  243. data/lib/7.2-preview/generated/azure_key_vault/models/attributes.rb +92 -0
  244. data/lib/7.2-preview/generated/azure_key_vault/models/backup_certificate_result.rb +47 -0
  245. data/lib/7.2-preview/generated/azure_key_vault/models/backup_key_result.rb +47 -0
  246. data/lib/7.2-preview/generated/azure_key_vault/models/backup_secret_result.rb +47 -0
  247. data/lib/7.2-preview/generated/azure_key_vault/models/backup_storage_result.rb +47 -0
  248. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_attributes.rb +109 -0
  249. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_bundle.rb +151 -0
  250. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_create_parameters.rb +80 -0
  251. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_import_parameters.rb +104 -0
  252. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_info_object.rb +80 -0
  253. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_issuer_item.rb +57 -0
  254. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_issuer_list_result.rb +102 -0
  255. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_issuer_set_parameters.rb +83 -0
  256. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_issuer_update_parameters.rb +83 -0
  257. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_item.rb +89 -0
  258. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_list_result.rb +102 -0
  259. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_merge_parameters.rb +88 -0
  260. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_operation.rb +142 -0
  261. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_operation_update_parameter.rb +47 -0
  262. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_policy.rb +131 -0
  263. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_restore_parameters.rb +46 -0
  264. data/lib/7.2-preview/generated/azure_key_vault/models/certificate_update_parameters.rb +80 -0
  265. data/lib/7.2-preview/generated/azure_key_vault/models/contact.rb +68 -0
  266. data/lib/7.2-preview/generated/azure_key_vault/models/contacts.rb +67 -0
  267. data/lib/7.2-preview/generated/azure_key_vault/models/data_action.rb +43 -0
  268. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_certificate_bundle.rb +159 -0
  269. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_certificate_item.rb +113 -0
  270. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_certificate_list_result.rb +102 -0
  271. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_key_bundle.rb +115 -0
  272. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_key_item.rb +114 -0
  273. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_key_list_result.rb +102 -0
  274. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_sas_definition_bundle.rb +145 -0
  275. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_sas_definition_item.rb +118 -0
  276. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_sas_definition_list_result.rb +103 -0
  277. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_secret_bundle.rb +139 -0
  278. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_secret_item.rb +121 -0
  279. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_secret_list_result.rb +102 -0
  280. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_storage_account_item.rb +118 -0
  281. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_storage_bundle.rb +146 -0
  282. data/lib/7.2-preview/generated/azure_key_vault/models/deleted_storage_list_result.rb +103 -0
  283. data/lib/7.2-preview/generated/azure_key_vault/models/deletion_recovery_level.rb +21 -0
  284. data/lib/7.2-preview/generated/azure_key_vault/models/error.rb +72 -0
  285. data/lib/7.2-preview/generated/azure_key_vault/models/full_backup_operation.rb +115 -0
  286. data/lib/7.2-preview/generated/azure_key_vault/models/issuer_attributes.rb +70 -0
  287. data/lib/7.2-preview/generated/azure_key_vault/models/issuer_bundle.rb +95 -0
  288. data/lib/7.2-preview/generated/azure_key_vault/models/issuer_credentials.rb +57 -0
  289. data/lib/7.2-preview/generated/azure_key_vault/models/issuer_parameters.rb +71 -0
  290. data/lib/7.2-preview/generated/azure_key_vault/models/json_web_key.rb +224 -0
  291. data/lib/7.2-preview/generated/azure_key_vault/models/json_web_key_curve_name.rb +18 -0
  292. data/lib/7.2-preview/generated/azure_key_vault/models/json_web_key_encryption_algorithm.rb +29 -0
  293. data/lib/7.2-preview/generated/azure_key_vault/models/json_web_key_operation.rb +21 -0
  294. data/lib/7.2-preview/generated/azure_key_vault/models/json_web_key_signature_algorithm.rb +25 -0
  295. data/lib/7.2-preview/generated/azure_key_vault/models/json_web_key_type.rb +20 -0
  296. data/lib/7.2-preview/generated/azure_key_vault/models/key_attributes.rb +109 -0
  297. data/lib/7.2-preview/generated/azure_key_vault/models/key_bundle.rb +92 -0
  298. data/lib/7.2-preview/generated/azure_key_vault/models/key_create_parameters.rb +138 -0
  299. data/lib/7.2-preview/generated/azure_key_vault/models/key_import_parameters.rb +91 -0
  300. data/lib/7.2-preview/generated/azure_key_vault/models/key_item.rb +91 -0
  301. data/lib/7.2-preview/generated/azure_key_vault/models/key_list_result.rb +101 -0
  302. data/lib/7.2-preview/generated/azure_key_vault/models/key_operation_result.rb +95 -0
  303. data/lib/7.2-preview/generated/azure_key_vault/models/key_operations_parameters.rb +98 -0
  304. data/lib/7.2-preview/generated/azure_key_vault/models/key_properties.rb +85 -0
  305. data/lib/7.2-preview/generated/azure_key_vault/models/key_restore_parameters.rb +46 -0
  306. data/lib/7.2-preview/generated/azure_key_vault/models/key_sign_parameters.rb +64 -0
  307. data/lib/7.2-preview/generated/azure_key_vault/models/key_update_parameters.rb +87 -0
  308. data/lib/7.2-preview/generated/azure_key_vault/models/key_usage_type.rb +23 -0
  309. data/lib/7.2-preview/generated/azure_key_vault/models/key_vault_error.rb +48 -0
  310. data/lib/7.2-preview/generated/azure_key_vault/models/key_verify_parameters.rb +75 -0
  311. data/lib/7.2-preview/generated/azure_key_vault/models/key_verify_result.rb +47 -0
  312. data/lib/7.2-preview/generated/azure_key_vault/models/lifetime_action.rb +60 -0
  313. data/lib/7.2-preview/generated/azure_key_vault/models/operation_status.rb +17 -0
  314. data/lib/7.2-preview/generated/azure_key_vault/models/organization_details.rb +67 -0
  315. data/lib/7.2-preview/generated/azure_key_vault/models/pending_certificate_signing_request_result.rb +48 -0
  316. data/lib/7.2-preview/generated/azure_key_vault/models/permission.rb +115 -0
  317. data/lib/7.2-preview/generated/azure_key_vault/models/restore_operation.rb +103 -0
  318. data/lib/7.2-preview/generated/azure_key_vault/models/restore_operation_parameters.rb +61 -0
  319. data/lib/7.2-preview/generated/azure_key_vault/models/role_assignment.rb +83 -0
  320. data/lib/7.2-preview/generated/azure_key_vault/models/role_assignment_create_parameters.rb +47 -0
  321. data/lib/7.2-preview/generated/azure_key_vault/models/role_assignment_filter.rb +46 -0
  322. data/lib/7.2-preview/generated/azure_key_vault/models/role_assignment_list_result.rb +98 -0
  323. data/lib/7.2-preview/generated/azure_key_vault/models/role_assignment_properties.rb +59 -0
  324. data/lib/7.2-preview/generated/azure_key_vault/models/role_assignment_properties_with_scope.rb +68 -0
  325. data/lib/7.2-preview/generated/azure_key_vault/models/role_definition.rb +145 -0
  326. data/lib/7.2-preview/generated/azure_key_vault/models/role_definition_create_parameters.rb +47 -0
  327. data/lib/7.2-preview/generated/azure_key_vault/models/role_definition_filter.rb +46 -0
  328. data/lib/7.2-preview/generated/azure_key_vault/models/role_definition_list_result.rb +98 -0
  329. data/lib/7.2-preview/generated/azure_key_vault/models/role_definition_properties.rb +108 -0
  330. data/lib/7.2-preview/generated/azure_key_vault/models/role_definition_type.rb +15 -0
  331. data/lib/7.2-preview/generated/azure_key_vault/models/role_scope.rb +16 -0
  332. data/lib/7.2-preview/generated/azure_key_vault/models/role_type.rb +16 -0
  333. data/lib/7.2-preview/generated/azure_key_vault/models/sas_definition_attributes.rb +102 -0
  334. data/lib/7.2-preview/generated/azure_key_vault/models/sas_definition_bundle.rb +134 -0
  335. data/lib/7.2-preview/generated/azure_key_vault/models/sas_definition_create_parameters.rb +104 -0
  336. data/lib/7.2-preview/generated/azure_key_vault/models/sas_definition_item.rb +94 -0
  337. data/lib/7.2-preview/generated/azure_key_vault/models/sas_definition_list_result.rb +102 -0
  338. data/lib/7.2-preview/generated/azure_key_vault/models/sas_definition_update_parameters.rb +104 -0
  339. data/lib/7.2-preview/generated/azure_key_vault/models/sas_token_type.rb +16 -0
  340. data/lib/7.2-preview/generated/azure_key_vault/models/sastoken_parameter.rb +59 -0
  341. data/lib/7.2-preview/generated/azure_key_vault/models/secret_attributes.rb +109 -0
  342. data/lib/7.2-preview/generated/azure_key_vault/models/secret_bundle.rb +127 -0
  343. data/lib/7.2-preview/generated/azure_key_vault/models/secret_item.rb +103 -0
  344. data/lib/7.2-preview/generated/azure_key_vault/models/secret_list_result.rb +101 -0
  345. data/lib/7.2-preview/generated/azure_key_vault/models/secret_properties.rb +46 -0
  346. data/lib/7.2-preview/generated/azure_key_vault/models/secret_restore_parameters.rb +46 -0
  347. data/lib/7.2-preview/generated/azure_key_vault/models/secret_set_parameters.rb +89 -0
  348. data/lib/7.2-preview/generated/azure_key_vault/models/secret_update_parameters.rb +78 -0
  349. data/lib/7.2-preview/generated/azure_key_vault/models/security_domain_certificate_item.rb +49 -0
  350. data/lib/7.2-preview/generated/azure_key_vault/models/security_domain_json_web_key.rb +165 -0
  351. data/lib/7.2-preview/generated/azure_key_vault/models/security_domain_object.rb +46 -0
  352. data/lib/7.2-preview/generated/azure_key_vault/models/security_domain_operation_status.rb +60 -0
  353. data/lib/7.2-preview/generated/azure_key_vault/models/selective_key_restore_operation.rb +103 -0
  354. data/lib/7.2-preview/generated/azure_key_vault/models/selective_key_restore_operation_parameters.rb +61 -0
  355. data/lib/7.2-preview/generated/azure_key_vault/models/storage_account_attributes.rb +102 -0
  356. data/lib/7.2-preview/generated/azure_key_vault/models/storage_account_create_parameters.rb +114 -0
  357. data/lib/7.2-preview/generated/azure_key_vault/models/storage_account_item.rb +94 -0
  358. data/lib/7.2-preview/generated/azure_key_vault/models/storage_account_regenerte_key_parameters.rb +46 -0
  359. data/lib/7.2-preview/generated/azure_key_vault/models/storage_account_update_parameters.rb +103 -0
  360. data/lib/7.2-preview/generated/azure_key_vault/models/storage_bundle.rb +132 -0
  361. data/lib/7.2-preview/generated/azure_key_vault/models/storage_list_result.rb +102 -0
  362. data/lib/7.2-preview/generated/azure_key_vault/models/storage_restore_parameters.rb +46 -0
  363. data/lib/7.2-preview/generated/azure_key_vault/models/subject_alternative_names.rb +92 -0
  364. data/lib/7.2-preview/generated/azure_key_vault/models/transfer_key.rb +62 -0
  365. data/lib/7.2-preview/generated/azure_key_vault/models/trigger.rb +65 -0
  366. data/lib/7.2-preview/generated/azure_key_vault/models/x509certificate_properties.rb +111 -0
  367. data/lib/7.2-preview/generated/azure_key_vault/module_definition.rb +8 -0
  368. data/lib/7.2-preview/generated/azure_key_vault/role_assignments.rb +578 -0
  369. data/lib/7.2-preview/generated/azure_key_vault/role_definitions.rb +579 -0
  370. data/lib/azure_key_vault.rb +6 -2
  371. data/lib/profiles/latest/modules/keyvault_profile_module.rb +393 -271
  372. data/lib/profiles/v2019_03_01_hybrid/keyvault_module_definition.rb +8 -0
  373. data/lib/profiles/v2019_03_01_hybrid/keyvault_v2019_03_01_hybrid_profile_client.rb +38 -0
  374. data/lib/profiles/v2019_03_01_hybrid/modules/keyvault_profile_module.rb +405 -0
  375. data/lib/version.rb +1 -1
  376. metadata +343 -5
@@ -0,0 +1,579 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::KeyVault::V7_2_preview
7
+ #
8
+ # The key vault client performs cryptographic key operations and vault
9
+ # operations against the Key Vault service.
10
+ #
11
+ class RoleDefinitions
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the RoleDefinitions class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [KeyVaultClient] reference to the KeyVaultClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Deletes a custom role definition.
27
+ #
28
+ # @param vault_base_url [String] The vault name, for example
29
+ # https://myvault.vault.azure.net.
30
+ # @param scope [String] The scope of the role definition to delete. Managed HSM
31
+ # only supports '/'.
32
+ # @param role_definition_name [String] The name (GUID) of the role definition
33
+ # to delete.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [RoleDefinition] operation results.
38
+ #
39
+ def delete(vault_base_url, scope, role_definition_name, custom_headers:nil)
40
+ response = delete_async(vault_base_url, scope, role_definition_name, custom_headers:custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # Deletes a custom role definition.
46
+ #
47
+ # @param vault_base_url [String] The vault name, for example
48
+ # https://myvault.vault.azure.net.
49
+ # @param scope [String] The scope of the role definition to delete. Managed HSM
50
+ # only supports '/'.
51
+ # @param role_definition_name [String] The name (GUID) of the role definition
52
+ # to delete.
53
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
+ # will be added to the HTTP request.
55
+ #
56
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
57
+ #
58
+ def delete_with_http_info(vault_base_url, scope, role_definition_name, custom_headers:nil)
59
+ delete_async(vault_base_url, scope, role_definition_name, custom_headers:custom_headers).value!
60
+ end
61
+
62
+ #
63
+ # Deletes a custom role definition.
64
+ #
65
+ # @param vault_base_url [String] The vault name, for example
66
+ # https://myvault.vault.azure.net.
67
+ # @param scope [String] The scope of the role definition to delete. Managed HSM
68
+ # only supports '/'.
69
+ # @param role_definition_name [String] The name (GUID) of the role definition
70
+ # to delete.
71
+ # @param [Hash{String => String}] A hash of custom headers that will be added
72
+ # to the HTTP request.
73
+ #
74
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
75
+ #
76
+ def delete_async(vault_base_url, scope, role_definition_name, custom_headers:nil)
77
+ fail ArgumentError, 'vault_base_url is nil' if vault_base_url.nil?
78
+ fail ArgumentError, 'scope is nil' if scope.nil?
79
+ fail ArgumentError, 'role_definition_name is nil' if role_definition_name.nil?
80
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
81
+
82
+
83
+ request_headers = {}
84
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
85
+
86
+ # Set Headers
87
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
88
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
89
+ path_template = '{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}'
90
+
91
+ request_url = @base_url || @client.base_url
92
+ request_url = request_url.gsub('{vaultBaseUrl}', vault_base_url)
93
+
94
+ options = {
95
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
96
+ path_params: {'roleDefinitionName' => role_definition_name},
97
+ skip_encoding_path_params: {'scope' => scope},
98
+ query_params: {'api-version' => @client.api_version},
99
+ headers: request_headers.merge(custom_headers || {}),
100
+ base_url: request_url
101
+ }
102
+ promise = @client.make_request_async(:delete, path_template, options)
103
+
104
+ promise = promise.then do |result|
105
+ http_response = result.response
106
+ status_code = http_response.status
107
+ response_content = http_response.body
108
+ unless status_code == 200
109
+ error_model = JSON.load(response_content)
110
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
111
+ end
112
+
113
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
114
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
115
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
116
+ # Deserialize Response
117
+ if status_code == 200
118
+ begin
119
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
120
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleDefinition.mapper()
121
+ result.body = @client.deserialize(result_mapper, parsed_response)
122
+ rescue Exception => e
123
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
124
+ end
125
+ end
126
+
127
+ result
128
+ end
129
+
130
+ promise.execute
131
+ end
132
+
133
+ #
134
+ # Creates or updates a custom role definition.
135
+ #
136
+ # @param vault_base_url [String] The vault name, for example
137
+ # https://myvault.vault.azure.net.
138
+ # @param scope [String] The scope of the role definition to create or update.
139
+ # Managed HSM only supports '/'.
140
+ # @param role_definition_name [String] The name of the role definition to
141
+ # create or update. It can be any valid GUID.
142
+ # @param parameters [RoleDefinitionCreateParameters] Parameters for the role
143
+ # definition.
144
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
145
+ # will be added to the HTTP request.
146
+ #
147
+ # @return [RoleDefinition] operation results.
148
+ #
149
+ def create_or_update(vault_base_url, scope, role_definition_name, parameters, custom_headers:nil)
150
+ response = create_or_update_async(vault_base_url, scope, role_definition_name, parameters, custom_headers:custom_headers).value!
151
+ response.body unless response.nil?
152
+ end
153
+
154
+ #
155
+ # Creates or updates a custom role definition.
156
+ #
157
+ # @param vault_base_url [String] The vault name, for example
158
+ # https://myvault.vault.azure.net.
159
+ # @param scope [String] The scope of the role definition to create or update.
160
+ # Managed HSM only supports '/'.
161
+ # @param role_definition_name [String] The name of the role definition to
162
+ # create or update. It can be any valid GUID.
163
+ # @param parameters [RoleDefinitionCreateParameters] Parameters for the role
164
+ # definition.
165
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
166
+ # will be added to the HTTP request.
167
+ #
168
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
169
+ #
170
+ def create_or_update_with_http_info(vault_base_url, scope, role_definition_name, parameters, custom_headers:nil)
171
+ create_or_update_async(vault_base_url, scope, role_definition_name, parameters, custom_headers:custom_headers).value!
172
+ end
173
+
174
+ #
175
+ # Creates or updates a custom role definition.
176
+ #
177
+ # @param vault_base_url [String] The vault name, for example
178
+ # https://myvault.vault.azure.net.
179
+ # @param scope [String] The scope of the role definition to create or update.
180
+ # Managed HSM only supports '/'.
181
+ # @param role_definition_name [String] The name of the role definition to
182
+ # create or update. It can be any valid GUID.
183
+ # @param parameters [RoleDefinitionCreateParameters] Parameters for the role
184
+ # definition.
185
+ # @param [Hash{String => String}] A hash of custom headers that will be added
186
+ # to the HTTP request.
187
+ #
188
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
189
+ #
190
+ def create_or_update_async(vault_base_url, scope, role_definition_name, parameters, custom_headers:nil)
191
+ fail ArgumentError, 'vault_base_url is nil' if vault_base_url.nil?
192
+ fail ArgumentError, 'scope is nil' if scope.nil?
193
+ fail ArgumentError, 'role_definition_name is nil' if role_definition_name.nil?
194
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
195
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
196
+
197
+
198
+ request_headers = {}
199
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
200
+
201
+ # Set Headers
202
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
203
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
204
+
205
+ # Serialize Request
206
+ request_mapper = Azure::KeyVault::V7_2_preview::Models::RoleDefinitionCreateParameters.mapper()
207
+ request_content = @client.serialize(request_mapper, parameters)
208
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
209
+
210
+ path_template = '{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}'
211
+
212
+ request_url = @base_url || @client.base_url
213
+ request_url = request_url.gsub('{vaultBaseUrl}', vault_base_url)
214
+
215
+ options = {
216
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
217
+ path_params: {'roleDefinitionName' => role_definition_name},
218
+ skip_encoding_path_params: {'scope' => scope},
219
+ query_params: {'api-version' => @client.api_version},
220
+ body: request_content,
221
+ headers: request_headers.merge(custom_headers || {}),
222
+ base_url: request_url
223
+ }
224
+ promise = @client.make_request_async(:put, path_template, options)
225
+
226
+ promise = promise.then do |result|
227
+ http_response = result.response
228
+ status_code = http_response.status
229
+ response_content = http_response.body
230
+ unless status_code == 201
231
+ error_model = JSON.load(response_content)
232
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
233
+ end
234
+
235
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
236
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
237
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
238
+ # Deserialize Response
239
+ if status_code == 201
240
+ begin
241
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
242
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleDefinition.mapper()
243
+ result.body = @client.deserialize(result_mapper, parsed_response)
244
+ rescue Exception => e
245
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
246
+ end
247
+ end
248
+
249
+ result
250
+ end
251
+
252
+ promise.execute
253
+ end
254
+
255
+ #
256
+ # Get the specified role definition.
257
+ #
258
+ # @param vault_base_url [String] The vault name, for example
259
+ # https://myvault.vault.azure.net.
260
+ # @param scope [String] The scope of the role definition to get. Managed HSM
261
+ # only supports '/'.
262
+ # @param role_definition_name [String] The name of the role definition to get.
263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
+ # will be added to the HTTP request.
265
+ #
266
+ # @return [RoleDefinition] operation results.
267
+ #
268
+ def get(vault_base_url, scope, role_definition_name, custom_headers:nil)
269
+ response = get_async(vault_base_url, scope, role_definition_name, custom_headers:custom_headers).value!
270
+ response.body unless response.nil?
271
+ end
272
+
273
+ #
274
+ # Get the specified role definition.
275
+ #
276
+ # @param vault_base_url [String] The vault name, for example
277
+ # https://myvault.vault.azure.net.
278
+ # @param scope [String] The scope of the role definition to get. Managed HSM
279
+ # only supports '/'.
280
+ # @param role_definition_name [String] The name of the role definition to get.
281
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
282
+ # will be added to the HTTP request.
283
+ #
284
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
285
+ #
286
+ def get_with_http_info(vault_base_url, scope, role_definition_name, custom_headers:nil)
287
+ get_async(vault_base_url, scope, role_definition_name, custom_headers:custom_headers).value!
288
+ end
289
+
290
+ #
291
+ # Get the specified role definition.
292
+ #
293
+ # @param vault_base_url [String] The vault name, for example
294
+ # https://myvault.vault.azure.net.
295
+ # @param scope [String] The scope of the role definition to get. Managed HSM
296
+ # only supports '/'.
297
+ # @param role_definition_name [String] The name of the role definition to get.
298
+ # @param [Hash{String => String}] A hash of custom headers that will be added
299
+ # to the HTTP request.
300
+ #
301
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
302
+ #
303
+ def get_async(vault_base_url, scope, role_definition_name, custom_headers:nil)
304
+ fail ArgumentError, 'vault_base_url is nil' if vault_base_url.nil?
305
+ fail ArgumentError, 'scope is nil' if scope.nil?
306
+ fail ArgumentError, 'role_definition_name is nil' if role_definition_name.nil?
307
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
308
+
309
+
310
+ request_headers = {}
311
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
312
+
313
+ # Set Headers
314
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
315
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
316
+ path_template = '{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}'
317
+
318
+ request_url = @base_url || @client.base_url
319
+ request_url = request_url.gsub('{vaultBaseUrl}', vault_base_url)
320
+
321
+ options = {
322
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
323
+ path_params: {'roleDefinitionName' => role_definition_name},
324
+ skip_encoding_path_params: {'scope' => scope},
325
+ query_params: {'api-version' => @client.api_version},
326
+ headers: request_headers.merge(custom_headers || {}),
327
+ base_url: request_url
328
+ }
329
+ promise = @client.make_request_async(:get, path_template, options)
330
+
331
+ promise = promise.then do |result|
332
+ http_response = result.response
333
+ status_code = http_response.status
334
+ response_content = http_response.body
335
+ unless status_code == 200
336
+ error_model = JSON.load(response_content)
337
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
338
+ end
339
+
340
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
341
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
342
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
343
+ # Deserialize Response
344
+ if status_code == 200
345
+ begin
346
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
347
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleDefinition.mapper()
348
+ result.body = @client.deserialize(result_mapper, parsed_response)
349
+ rescue Exception => e
350
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
351
+ end
352
+ end
353
+
354
+ result
355
+ end
356
+
357
+ promise.execute
358
+ end
359
+
360
+ #
361
+ # Get all role definitions that are applicable at scope and above.
362
+ #
363
+ # @param vault_base_url [String] The vault name, for example
364
+ # https://myvault.vault.azure.net.
365
+ # @param scope [String] The scope of the role definition.
366
+ # @param filter [String] The filter to apply on the operation. Use
367
+ # atScopeAndBelow filter to search below the given scope as well.
368
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
369
+ # will be added to the HTTP request.
370
+ #
371
+ # @return [Array<RoleDefinition>] operation results.
372
+ #
373
+ def list(vault_base_url, scope, filter:nil, custom_headers:nil)
374
+ first_page = list_as_lazy(vault_base_url, scope, filter:filter, custom_headers:custom_headers)
375
+ first_page.get_all_items
376
+ end
377
+
378
+ #
379
+ # Get all role definitions that are applicable at scope and above.
380
+ #
381
+ # @param vault_base_url [String] The vault name, for example
382
+ # https://myvault.vault.azure.net.
383
+ # @param scope [String] The scope of the role definition.
384
+ # @param filter [String] The filter to apply on the operation. Use
385
+ # atScopeAndBelow filter to search below the given scope as well.
386
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
387
+ # will be added to the HTTP request.
388
+ #
389
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
390
+ #
391
+ def list_with_http_info(vault_base_url, scope, filter:nil, custom_headers:nil)
392
+ list_async(vault_base_url, scope, filter:filter, custom_headers:custom_headers).value!
393
+ end
394
+
395
+ #
396
+ # Get all role definitions that are applicable at scope and above.
397
+ #
398
+ # @param vault_base_url [String] The vault name, for example
399
+ # https://myvault.vault.azure.net.
400
+ # @param scope [String] The scope of the role definition.
401
+ # @param filter [String] The filter to apply on the operation. Use
402
+ # atScopeAndBelow filter to search below the given scope as well.
403
+ # @param [Hash{String => String}] A hash of custom headers that will be added
404
+ # to the HTTP request.
405
+ #
406
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
407
+ #
408
+ def list_async(vault_base_url, scope, filter:nil, custom_headers:nil)
409
+ fail ArgumentError, 'vault_base_url is nil' if vault_base_url.nil?
410
+ fail ArgumentError, 'scope is nil' if scope.nil?
411
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
412
+
413
+
414
+ request_headers = {}
415
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
416
+
417
+ # Set Headers
418
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
419
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
420
+ path_template = '{scope}/providers/Microsoft.Authorization/roleDefinitions'
421
+
422
+ request_url = @base_url || @client.base_url
423
+ request_url = request_url.gsub('{vaultBaseUrl}', vault_base_url)
424
+
425
+ options = {
426
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
427
+ skip_encoding_path_params: {'scope' => scope},
428
+ query_params: {'$filter' => filter,'api-version' => @client.api_version},
429
+ headers: request_headers.merge(custom_headers || {}),
430
+ base_url: request_url
431
+ }
432
+ promise = @client.make_request_async(:get, path_template, options)
433
+
434
+ promise = promise.then do |result|
435
+ http_response = result.response
436
+ status_code = http_response.status
437
+ response_content = http_response.body
438
+ unless status_code == 200
439
+ error_model = JSON.load(response_content)
440
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
441
+ end
442
+
443
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
444
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
445
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
446
+ # Deserialize Response
447
+ if status_code == 200
448
+ begin
449
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
450
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleDefinitionListResult.mapper()
451
+ result.body = @client.deserialize(result_mapper, parsed_response)
452
+ rescue Exception => e
453
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
454
+ end
455
+ end
456
+
457
+ result
458
+ end
459
+
460
+ promise.execute
461
+ end
462
+
463
+ #
464
+ # Get all role definitions that are applicable at scope and above.
465
+ #
466
+ # @param next_page_link [String] The NextLink from the previous successful call
467
+ # to List operation.
468
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
469
+ # will be added to the HTTP request.
470
+ #
471
+ # @return [RoleDefinitionListResult] operation results.
472
+ #
473
+ def list_next(next_page_link, custom_headers:nil)
474
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
475
+ response.body unless response.nil?
476
+ end
477
+
478
+ #
479
+ # Get all role definitions that are applicable at scope and above.
480
+ #
481
+ # @param next_page_link [String] The NextLink from the previous successful call
482
+ # to List operation.
483
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
484
+ # will be added to the HTTP request.
485
+ #
486
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
487
+ #
488
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
489
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
490
+ end
491
+
492
+ #
493
+ # Get all role definitions that are applicable at scope and above.
494
+ #
495
+ # @param next_page_link [String] The NextLink from the previous successful call
496
+ # to List operation.
497
+ # @param [Hash{String => String}] A hash of custom headers that will be added
498
+ # to the HTTP request.
499
+ #
500
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
501
+ #
502
+ def list_next_async(next_page_link, custom_headers:nil)
503
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
504
+
505
+
506
+ request_headers = {}
507
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
508
+
509
+ # Set Headers
510
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
511
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
512
+ path_template = '{nextLink}'
513
+
514
+ request_url = @base_url || @client.base_url
515
+
516
+ options = {
517
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
518
+ skip_encoding_path_params: {'nextLink' => next_page_link},
519
+ headers: request_headers.merge(custom_headers || {}),
520
+ base_url: request_url
521
+ }
522
+ promise = @client.make_request_async(:get, path_template, options)
523
+
524
+ promise = promise.then do |result|
525
+ http_response = result.response
526
+ status_code = http_response.status
527
+ response_content = http_response.body
528
+ unless status_code == 200
529
+ error_model = JSON.load(response_content)
530
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
531
+ end
532
+
533
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
534
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
535
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
536
+ # Deserialize Response
537
+ if status_code == 200
538
+ begin
539
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
540
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleDefinitionListResult.mapper()
541
+ result.body = @client.deserialize(result_mapper, parsed_response)
542
+ rescue Exception => e
543
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
544
+ end
545
+ end
546
+
547
+ result
548
+ end
549
+
550
+ promise.execute
551
+ end
552
+
553
+ #
554
+ # Get all role definitions that are applicable at scope and above.
555
+ #
556
+ # @param vault_base_url [String] The vault name, for example
557
+ # https://myvault.vault.azure.net.
558
+ # @param scope [String] The scope of the role definition.
559
+ # @param filter [String] The filter to apply on the operation. Use
560
+ # atScopeAndBelow filter to search below the given scope as well.
561
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
562
+ # will be added to the HTTP request.
563
+ #
564
+ # @return [RoleDefinitionListResult] which provide lazy access to pages of the
565
+ # response.
566
+ #
567
+ def list_as_lazy(vault_base_url, scope, filter:nil, custom_headers:nil)
568
+ response = list_async(vault_base_url, scope, filter:filter, custom_headers:custom_headers).value!
569
+ unless response.nil?
570
+ page = response.body
571
+ page.next_method = Proc.new do |next_page_link|
572
+ list_next_async(next_page_link, custom_headers:custom_headers)
573
+ end
574
+ page
575
+ end
576
+ end
577
+
578
+ end
579
+ end