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,111 @@
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
+ module Models
8
+ #
9
+ # Properties of the X509 component of a certificate.
10
+ #
11
+ class X509CertificateProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The subject name. Should be a valid X509 distinguished
16
+ # Name.
17
+ attr_accessor :subject
18
+
19
+ # @return [Array<String>] The enhanced key usage.
20
+ attr_accessor :ekus
21
+
22
+ # @return [SubjectAlternativeNames] The subject alternative names.
23
+ attr_accessor :subject_alternative_names
24
+
25
+ # @return [Array<KeyUsageType>] List of key usages.
26
+ attr_accessor :key_usage
27
+
28
+ # @return [Integer] The duration that the certificate is valid in months.
29
+ attr_accessor :validity_in_months
30
+
31
+
32
+ #
33
+ # Mapper for X509CertificateProperties class as Ruby Hash.
34
+ # This will be used for serialization/deserialization.
35
+ #
36
+ def self.mapper()
37
+ {
38
+ client_side_validation: true,
39
+ required: false,
40
+ serialized_name: 'X509CertificateProperties',
41
+ type: {
42
+ name: 'Composite',
43
+ class_name: 'X509CertificateProperties',
44
+ model_properties: {
45
+ subject: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'subject',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ },
53
+ ekus: {
54
+ client_side_validation: true,
55
+ required: false,
56
+ serialized_name: 'ekus',
57
+ type: {
58
+ name: 'Sequence',
59
+ element: {
60
+ client_side_validation: true,
61
+ required: false,
62
+ serialized_name: 'StringElementType',
63
+ type: {
64
+ name: 'String'
65
+ }
66
+ }
67
+ }
68
+ },
69
+ subject_alternative_names: {
70
+ client_side_validation: true,
71
+ required: false,
72
+ serialized_name: 'sans',
73
+ type: {
74
+ name: 'Composite',
75
+ class_name: 'SubjectAlternativeNames'
76
+ }
77
+ },
78
+ key_usage: {
79
+ client_side_validation: true,
80
+ required: false,
81
+ serialized_name: 'key_usage',
82
+ type: {
83
+ name: 'Sequence',
84
+ element: {
85
+ client_side_validation: true,
86
+ required: false,
87
+ serialized_name: 'KeyUsageTypeElementType',
88
+ type: {
89
+ name: 'String'
90
+ }
91
+ }
92
+ }
93
+ },
94
+ validity_in_months: {
95
+ client_side_validation: true,
96
+ required: false,
97
+ serialized_name: 'validity_months',
98
+ constraints: {
99
+ InclusiveMinimum: 0
100
+ },
101
+ type: {
102
+ name: 'Number'
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,8 @@
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 end
7
+ module Azure::KeyVault end
8
+ module Azure::KeyVault::V7_2_preview end
@@ -0,0 +1,578 @@
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 RoleAssignments
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the RoleAssignments 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 role assignment.
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 assignment to delete.
31
+ # @param role_assignment_name [String] The name of the role assignment to
32
+ # delete.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [RoleAssignment] operation results.
37
+ #
38
+ def delete(vault_base_url, scope, role_assignment_name, custom_headers:nil)
39
+ response = delete_async(vault_base_url, scope, role_assignment_name, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # Deletes a role assignment.
45
+ #
46
+ # @param vault_base_url [String] The vault name, for example
47
+ # https://myvault.vault.azure.net.
48
+ # @param scope [String] The scope of the role assignment to delete.
49
+ # @param role_assignment_name [String] The name of the role assignment to
50
+ # delete.
51
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
52
+ # will be added to the HTTP request.
53
+ #
54
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
55
+ #
56
+ def delete_with_http_info(vault_base_url, scope, role_assignment_name, custom_headers:nil)
57
+ delete_async(vault_base_url, scope, role_assignment_name, custom_headers:custom_headers).value!
58
+ end
59
+
60
+ #
61
+ # Deletes a role assignment.
62
+ #
63
+ # @param vault_base_url [String] The vault name, for example
64
+ # https://myvault.vault.azure.net.
65
+ # @param scope [String] The scope of the role assignment to delete.
66
+ # @param role_assignment_name [String] The name of the role assignment to
67
+ # delete.
68
+ # @param [Hash{String => String}] A hash of custom headers that will be added
69
+ # to the HTTP request.
70
+ #
71
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
72
+ #
73
+ def delete_async(vault_base_url, scope, role_assignment_name, custom_headers:nil)
74
+ fail ArgumentError, 'vault_base_url is nil' if vault_base_url.nil?
75
+ fail ArgumentError, 'scope is nil' if scope.nil?
76
+ fail ArgumentError, 'role_assignment_name is nil' if role_assignment_name.nil?
77
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
78
+
79
+
80
+ request_headers = {}
81
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
82
+
83
+ # Set Headers
84
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
85
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
86
+ path_template = '{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'
87
+
88
+ request_url = @base_url || @client.base_url
89
+ request_url = request_url.gsub('{vaultBaseUrl}', vault_base_url)
90
+
91
+ options = {
92
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
93
+ path_params: {'roleAssignmentName' => role_assignment_name},
94
+ skip_encoding_path_params: {'scope' => scope},
95
+ query_params: {'api-version' => @client.api_version},
96
+ headers: request_headers.merge(custom_headers || {}),
97
+ base_url: request_url
98
+ }
99
+ promise = @client.make_request_async(:delete, path_template, options)
100
+
101
+ promise = promise.then do |result|
102
+ http_response = result.response
103
+ status_code = http_response.status
104
+ response_content = http_response.body
105
+ unless status_code == 200
106
+ error_model = JSON.load(response_content)
107
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
108
+ end
109
+
110
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
111
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
112
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
113
+ # Deserialize Response
114
+ if status_code == 200
115
+ begin
116
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
117
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleAssignment.mapper()
118
+ result.body = @client.deserialize(result_mapper, parsed_response)
119
+ rescue Exception => e
120
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
121
+ end
122
+ end
123
+
124
+ result
125
+ end
126
+
127
+ promise.execute
128
+ end
129
+
130
+ #
131
+ # Creates a role assignment.
132
+ #
133
+ # @param vault_base_url [String] The vault name, for example
134
+ # https://myvault.vault.azure.net.
135
+ # @param scope [String] The scope of the role assignment to create.
136
+ # @param role_assignment_name [String] The name of the role assignment to
137
+ # create. It can be any valid GUID.
138
+ # @param parameters [RoleAssignmentCreateParameters] Parameters for the role
139
+ # assignment.
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [RoleAssignment] operation results.
144
+ #
145
+ def create(vault_base_url, scope, role_assignment_name, parameters, custom_headers:nil)
146
+ response = create_async(vault_base_url, scope, role_assignment_name, parameters, custom_headers:custom_headers).value!
147
+ response.body unless response.nil?
148
+ end
149
+
150
+ #
151
+ # Creates a role assignment.
152
+ #
153
+ # @param vault_base_url [String] The vault name, for example
154
+ # https://myvault.vault.azure.net.
155
+ # @param scope [String] The scope of the role assignment to create.
156
+ # @param role_assignment_name [String] The name of the role assignment to
157
+ # create. It can be any valid GUID.
158
+ # @param parameters [RoleAssignmentCreateParameters] Parameters for the role
159
+ # assignment.
160
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
161
+ # will be added to the HTTP request.
162
+ #
163
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
164
+ #
165
+ def create_with_http_info(vault_base_url, scope, role_assignment_name, parameters, custom_headers:nil)
166
+ create_async(vault_base_url, scope, role_assignment_name, parameters, custom_headers:custom_headers).value!
167
+ end
168
+
169
+ #
170
+ # Creates a role assignment.
171
+ #
172
+ # @param vault_base_url [String] The vault name, for example
173
+ # https://myvault.vault.azure.net.
174
+ # @param scope [String] The scope of the role assignment to create.
175
+ # @param role_assignment_name [String] The name of the role assignment to
176
+ # create. It can be any valid GUID.
177
+ # @param parameters [RoleAssignmentCreateParameters] Parameters for the role
178
+ # assignment.
179
+ # @param [Hash{String => String}] A hash of custom headers that will be added
180
+ # to the HTTP request.
181
+ #
182
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
183
+ #
184
+ def create_async(vault_base_url, scope, role_assignment_name, parameters, custom_headers:nil)
185
+ fail ArgumentError, 'vault_base_url is nil' if vault_base_url.nil?
186
+ fail ArgumentError, 'scope is nil' if scope.nil?
187
+ fail ArgumentError, 'role_assignment_name is nil' if role_assignment_name.nil?
188
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
189
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
190
+
191
+
192
+ request_headers = {}
193
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
194
+
195
+ # Set Headers
196
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
197
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
198
+
199
+ # Serialize Request
200
+ request_mapper = Azure::KeyVault::V7_2_preview::Models::RoleAssignmentCreateParameters.mapper()
201
+ request_content = @client.serialize(request_mapper, parameters)
202
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
203
+
204
+ path_template = '{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'
205
+
206
+ request_url = @base_url || @client.base_url
207
+ request_url = request_url.gsub('{vaultBaseUrl}', vault_base_url)
208
+
209
+ options = {
210
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
211
+ path_params: {'roleAssignmentName' => role_assignment_name},
212
+ skip_encoding_path_params: {'scope' => scope},
213
+ query_params: {'api-version' => @client.api_version},
214
+ body: request_content,
215
+ headers: request_headers.merge(custom_headers || {}),
216
+ base_url: request_url
217
+ }
218
+ promise = @client.make_request_async(:put, path_template, options)
219
+
220
+ promise = promise.then do |result|
221
+ http_response = result.response
222
+ status_code = http_response.status
223
+ response_content = http_response.body
224
+ unless status_code == 201
225
+ error_model = JSON.load(response_content)
226
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
227
+ end
228
+
229
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
230
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
231
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
232
+ # Deserialize Response
233
+ if status_code == 201
234
+ begin
235
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
236
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleAssignment.mapper()
237
+ result.body = @client.deserialize(result_mapper, parsed_response)
238
+ rescue Exception => e
239
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
240
+ end
241
+ end
242
+
243
+ result
244
+ end
245
+
246
+ promise.execute
247
+ end
248
+
249
+ #
250
+ # Get the specified role assignment.
251
+ #
252
+ # @param vault_base_url [String] The vault name, for example
253
+ # https://myvault.vault.azure.net.
254
+ # @param scope [String] The scope of the role assignment.
255
+ # @param role_assignment_name [String] The name of the role assignment to get.
256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
257
+ # will be added to the HTTP request.
258
+ #
259
+ # @return [RoleAssignment] operation results.
260
+ #
261
+ def get(vault_base_url, scope, role_assignment_name, custom_headers:nil)
262
+ response = get_async(vault_base_url, scope, role_assignment_name, custom_headers:custom_headers).value!
263
+ response.body unless response.nil?
264
+ end
265
+
266
+ #
267
+ # Get the specified role assignment.
268
+ #
269
+ # @param vault_base_url [String] The vault name, for example
270
+ # https://myvault.vault.azure.net.
271
+ # @param scope [String] The scope of the role assignment.
272
+ # @param role_assignment_name [String] The name of the role assignment to get.
273
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
274
+ # will be added to the HTTP request.
275
+ #
276
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
277
+ #
278
+ def get_with_http_info(vault_base_url, scope, role_assignment_name, custom_headers:nil)
279
+ get_async(vault_base_url, scope, role_assignment_name, custom_headers:custom_headers).value!
280
+ end
281
+
282
+ #
283
+ # Get the specified role assignment.
284
+ #
285
+ # @param vault_base_url [String] The vault name, for example
286
+ # https://myvault.vault.azure.net.
287
+ # @param scope [String] The scope of the role assignment.
288
+ # @param role_assignment_name [String] The name of the role assignment to get.
289
+ # @param [Hash{String => String}] A hash of custom headers that will be added
290
+ # to the HTTP request.
291
+ #
292
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
293
+ #
294
+ def get_async(vault_base_url, scope, role_assignment_name, custom_headers:nil)
295
+ fail ArgumentError, 'vault_base_url is nil' if vault_base_url.nil?
296
+ fail ArgumentError, 'scope is nil' if scope.nil?
297
+ fail ArgumentError, 'role_assignment_name is nil' if role_assignment_name.nil?
298
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
299
+
300
+
301
+ request_headers = {}
302
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
303
+
304
+ # Set Headers
305
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
306
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
307
+ path_template = '{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}'
308
+
309
+ request_url = @base_url || @client.base_url
310
+ request_url = request_url.gsub('{vaultBaseUrl}', vault_base_url)
311
+
312
+ options = {
313
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
314
+ path_params: {'roleAssignmentName' => role_assignment_name},
315
+ skip_encoding_path_params: {'scope' => scope},
316
+ query_params: {'api-version' => @client.api_version},
317
+ headers: request_headers.merge(custom_headers || {}),
318
+ base_url: request_url
319
+ }
320
+ promise = @client.make_request_async(:get, path_template, options)
321
+
322
+ promise = promise.then do |result|
323
+ http_response = result.response
324
+ status_code = http_response.status
325
+ response_content = http_response.body
326
+ unless status_code == 200
327
+ error_model = JSON.load(response_content)
328
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
329
+ end
330
+
331
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
332
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
333
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
334
+ # Deserialize Response
335
+ if status_code == 200
336
+ begin
337
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
338
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleAssignment.mapper()
339
+ result.body = @client.deserialize(result_mapper, parsed_response)
340
+ rescue Exception => e
341
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
342
+ end
343
+ end
344
+
345
+ result
346
+ end
347
+
348
+ promise.execute
349
+ end
350
+
351
+ #
352
+ # Gets role assignments for a scope.
353
+ #
354
+ # @param vault_base_url [String] The vault name, for example
355
+ # https://myvault.vault.azure.net.
356
+ # @param scope [String] The scope of the role assignments.
357
+ # @param filter [String] The filter to apply on the operation. Use
358
+ # $filter=atScope() to return all role assignments at or above the scope. Use
359
+ # $filter=principalId eq {id} to return all role assignments at, above or below
360
+ # the scope for the specified principal.
361
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
362
+ # will be added to the HTTP request.
363
+ #
364
+ # @return [Array<RoleAssignment>] operation results.
365
+ #
366
+ def list_for_scope(vault_base_url, scope, filter:nil, custom_headers:nil)
367
+ first_page = list_for_scope_as_lazy(vault_base_url, scope, filter:filter, custom_headers:custom_headers)
368
+ first_page.get_all_items
369
+ end
370
+
371
+ #
372
+ # Gets role assignments for a scope.
373
+ #
374
+ # @param vault_base_url [String] The vault name, for example
375
+ # https://myvault.vault.azure.net.
376
+ # @param scope [String] The scope of the role assignments.
377
+ # @param filter [String] The filter to apply on the operation. Use
378
+ # $filter=atScope() to return all role assignments at or above the scope. Use
379
+ # $filter=principalId eq {id} to return all role assignments at, above or below
380
+ # the scope for the specified principal.
381
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
382
+ # will be added to the HTTP request.
383
+ #
384
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
385
+ #
386
+ def list_for_scope_with_http_info(vault_base_url, scope, filter:nil, custom_headers:nil)
387
+ list_for_scope_async(vault_base_url, scope, filter:filter, custom_headers:custom_headers).value!
388
+ end
389
+
390
+ #
391
+ # Gets role assignments for a scope.
392
+ #
393
+ # @param vault_base_url [String] The vault name, for example
394
+ # https://myvault.vault.azure.net.
395
+ # @param scope [String] The scope of the role assignments.
396
+ # @param filter [String] The filter to apply on the operation. Use
397
+ # $filter=atScope() to return all role assignments at or above the scope. Use
398
+ # $filter=principalId eq {id} to return all role assignments at, above or below
399
+ # the scope for the specified principal.
400
+ # @param [Hash{String => String}] A hash of custom headers that will be added
401
+ # to the HTTP request.
402
+ #
403
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
404
+ #
405
+ def list_for_scope_async(vault_base_url, scope, filter:nil, custom_headers:nil)
406
+ fail ArgumentError, 'vault_base_url is nil' if vault_base_url.nil?
407
+ fail ArgumentError, 'scope is nil' if scope.nil?
408
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
409
+
410
+
411
+ request_headers = {}
412
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
413
+
414
+ # Set Headers
415
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
416
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
417
+ path_template = '{scope}/providers/Microsoft.Authorization/roleAssignments'
418
+
419
+ request_url = @base_url || @client.base_url
420
+ request_url = request_url.gsub('{vaultBaseUrl}', vault_base_url)
421
+
422
+ options = {
423
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
424
+ skip_encoding_path_params: {'scope' => scope},
425
+ query_params: {'$filter' => filter,'api-version' => @client.api_version},
426
+ headers: request_headers.merge(custom_headers || {}),
427
+ base_url: request_url
428
+ }
429
+ promise = @client.make_request_async(:get, path_template, options)
430
+
431
+ promise = promise.then do |result|
432
+ http_response = result.response
433
+ status_code = http_response.status
434
+ response_content = http_response.body
435
+ unless status_code == 200
436
+ error_model = JSON.load(response_content)
437
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
438
+ end
439
+
440
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
441
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
442
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
443
+ # Deserialize Response
444
+ if status_code == 200
445
+ begin
446
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
447
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleAssignmentListResult.mapper()
448
+ result.body = @client.deserialize(result_mapper, parsed_response)
449
+ rescue Exception => e
450
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
451
+ end
452
+ end
453
+
454
+ result
455
+ end
456
+
457
+ promise.execute
458
+ end
459
+
460
+ #
461
+ # Gets role assignments for a scope.
462
+ #
463
+ # @param next_page_link [String] The NextLink from the previous successful call
464
+ # to List operation.
465
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
466
+ # will be added to the HTTP request.
467
+ #
468
+ # @return [RoleAssignmentListResult] operation results.
469
+ #
470
+ def list_for_scope_next(next_page_link, custom_headers:nil)
471
+ response = list_for_scope_next_async(next_page_link, custom_headers:custom_headers).value!
472
+ response.body unless response.nil?
473
+ end
474
+
475
+ #
476
+ # Gets role assignments for a scope.
477
+ #
478
+ # @param next_page_link [String] The NextLink from the previous successful call
479
+ # to List operation.
480
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
481
+ # will be added to the HTTP request.
482
+ #
483
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
484
+ #
485
+ def list_for_scope_next_with_http_info(next_page_link, custom_headers:nil)
486
+ list_for_scope_next_async(next_page_link, custom_headers:custom_headers).value!
487
+ end
488
+
489
+ #
490
+ # Gets role assignments for a scope.
491
+ #
492
+ # @param next_page_link [String] The NextLink from the previous successful call
493
+ # to List operation.
494
+ # @param [Hash{String => String}] A hash of custom headers that will be added
495
+ # to the HTTP request.
496
+ #
497
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
498
+ #
499
+ def list_for_scope_next_async(next_page_link, custom_headers:nil)
500
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
501
+
502
+
503
+ request_headers = {}
504
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
505
+
506
+ # Set Headers
507
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
508
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
509
+ path_template = '{nextLink}'
510
+
511
+ request_url = @base_url || @client.base_url
512
+
513
+ options = {
514
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
515
+ skip_encoding_path_params: {'nextLink' => next_page_link},
516
+ headers: request_headers.merge(custom_headers || {}),
517
+ base_url: request_url
518
+ }
519
+ promise = @client.make_request_async(:get, path_template, options)
520
+
521
+ promise = promise.then do |result|
522
+ http_response = result.response
523
+ status_code = http_response.status
524
+ response_content = http_response.body
525
+ unless status_code == 200
526
+ error_model = JSON.load(response_content)
527
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
528
+ end
529
+
530
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
531
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
532
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
533
+ # Deserialize Response
534
+ if status_code == 200
535
+ begin
536
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
537
+ result_mapper = Azure::KeyVault::V7_2_preview::Models::RoleAssignmentListResult.mapper()
538
+ result.body = @client.deserialize(result_mapper, parsed_response)
539
+ rescue Exception => e
540
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
541
+ end
542
+ end
543
+
544
+ result
545
+ end
546
+
547
+ promise.execute
548
+ end
549
+
550
+ #
551
+ # Gets role assignments for a scope.
552
+ #
553
+ # @param vault_base_url [String] The vault name, for example
554
+ # https://myvault.vault.azure.net.
555
+ # @param scope [String] The scope of the role assignments.
556
+ # @param filter [String] The filter to apply on the operation. Use
557
+ # $filter=atScope() to return all role assignments at or above the scope. Use
558
+ # $filter=principalId eq {id} to return all role assignments at, above or below
559
+ # the scope for the specified principal.
560
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
561
+ # will be added to the HTTP request.
562
+ #
563
+ # @return [RoleAssignmentListResult] which provide lazy access to pages of the
564
+ # response.
565
+ #
566
+ def list_for_scope_as_lazy(vault_base_url, scope, filter:nil, custom_headers:nil)
567
+ response = list_for_scope_async(vault_base_url, scope, filter:filter, custom_headers:custom_headers).value!
568
+ unless response.nil?
569
+ page = response.body
570
+ page.next_method = Proc.new do |next_page_link|
571
+ list_for_scope_next_async(next_page_link, custom_headers:custom_headers)
572
+ end
573
+ page
574
+ end
575
+ end
576
+
577
+ end
578
+ end