oci 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/oci.rb +3 -0
  4. data/lib/oci/api_client.rb +24 -3
  5. data/lib/oci/audit/audit_client.rb +19 -5
  6. data/lib/oci/audit/models/audit_event.rb +19 -0
  7. data/lib/oci/audit/models/configuration.rb +1 -0
  8. data/lib/oci/audit/models/update_configuration_details.rb +1 -0
  9. data/lib/oci/auth/auth.rb +16 -0
  10. data/lib/oci/auth/federation_client.rb +125 -0
  11. data/lib/oci/auth/internal/auth_token_request_signer.rb +20 -0
  12. data/lib/oci/auth/security_token_container.rb +25 -0
  13. data/lib/oci/auth/session_key_supplier.rb +37 -0
  14. data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +83 -0
  15. data/lib/oci/auth/signers/security_token_signer.rb +32 -0
  16. data/lib/oci/auth/signers/x509_federation_client_based_security_token_signer.rb +70 -0
  17. data/lib/oci/auth/url_based_certificate_retriever.rb +104 -0
  18. data/lib/oci/auth/util.rb +33 -0
  19. data/lib/oci/base_signer.rb +154 -0
  20. data/lib/oci/core/blockstorage_client.rb +19 -5
  21. data/lib/oci/core/compute_client.rb +19 -5
  22. data/lib/oci/core/models/attach_boot_volume_details.rb +5 -2
  23. data/lib/oci/core/models/attach_i_scsi_volume_details.rb +5 -1
  24. data/lib/oci/core/models/attach_vnic_details.rb +6 -2
  25. data/lib/oci/core/models/attach_volume_details.rb +8 -3
  26. data/lib/oci/core/models/boot_volume.rb +22 -6
  27. data/lib/oci/core/models/boot_volume_attachment.rb +17 -7
  28. data/lib/oci/core/models/bulk_add_virtual_circuit_public_prefixes_details.rb +2 -1
  29. data/lib/oci/core/models/bulk_delete_virtual_circuit_public_prefixes_details.rb +2 -1
  30. data/lib/oci/core/models/capture_console_history_details.rb +5 -1
  31. data/lib/oci/core/models/connect_local_peering_gateways_details.rb +3 -1
  32. data/lib/oci/core/models/console_history.rb +19 -6
  33. data/lib/oci/core/models/cpe.rb +18 -3
  34. data/lib/oci/core/models/create_cpe_details.rb +5 -2
  35. data/lib/oci/core/models/create_cross_connect_details.rb +10 -3
  36. data/lib/oci/core/models/create_cross_connect_group_details.rb +3 -1
  37. data/lib/oci/core/models/create_dhcp_details.rb +9 -3
  38. data/lib/oci/core/models/create_drg_attachment_details.rb +5 -2
  39. data/lib/oci/core/models/create_drg_details.rb +3 -1
  40. data/lib/oci/core/models/create_image_details.rb +9 -1
  41. data/lib/oci/core/models/create_instance_console_connection_details.rb +9 -2
  42. data/lib/oci/core/models/create_internet_gateway_details.rb +8 -4
  43. data/lib/oci/core/models/create_ip_sec_connection_details.rb +9 -4
  44. data/lib/oci/core/models/create_local_peering_gateway_details.rb +5 -2
  45. data/lib/oci/core/models/create_private_ip_details.rb +7 -1
  46. data/lib/oci/core/models/create_route_table_details.rb +9 -3
  47. data/lib/oci/core/models/create_security_list_details.rb +11 -4
  48. data/lib/oci/core/models/create_subnet_details.rb +17 -5
  49. data/lib/oci/core/models/create_vcn_details.rb +8 -2
  50. data/lib/oci/core/models/create_virtual_circuit_details.rb +14 -2
  51. data/lib/oci/core/models/create_virtual_circuit_public_prefix_details.rb +2 -1
  52. data/lib/oci/core/models/create_vnic_details.rb +14 -3
  53. data/lib/oci/core/models/create_volume_backup_details.rb +5 -1
  54. data/lib/oci/core/models/create_volume_details.rb +11 -2
  55. data/lib/oci/core/models/cross_connect.rb +26 -0
  56. data/lib/oci/core/models/cross_connect_group.rb +19 -0
  57. data/lib/oci/core/models/cross_connect_location.rb +5 -2
  58. data/lib/oci/core/models/cross_connect_mapping.rb +31 -0
  59. data/lib/oci/core/models/cross_connect_port_speed_shape.rb +6 -2
  60. data/lib/oci/core/models/cross_connect_status.rb +6 -1
  61. data/lib/oci/core/models/delete_virtual_circuit_public_prefix_details.rb +2 -1
  62. data/lib/oci/core/models/dhcp_dns_option.rb +7 -1
  63. data/lib/oci/core/models/dhcp_option.rb +9 -1
  64. data/lib/oci/core/models/dhcp_options.rb +31 -6
  65. data/lib/oci/core/models/dhcp_search_domain_option.rb +5 -1
  66. data/lib/oci/core/models/drg.rb +18 -3
  67. data/lib/oci/core/models/drg_attachment.rb +15 -5
  68. data/lib/oci/core/models/egress_security_rule.rb +10 -3
  69. data/lib/oci/core/models/export_image_details.rb +13 -1
  70. data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +3 -0
  71. data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +2 -1
  72. data/lib/oci/core/models/fast_connect_provider_service.rb +17 -6
  73. data/lib/oci/core/models/i_scsi_volume_attachment.rb +17 -3
  74. data/lib/oci/core/models/icmp_options.rb +11 -1
  75. data/lib/oci/core/models/image.rb +28 -7
  76. data/lib/oci/core/models/image_source_details.rb +4 -1
  77. data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +7 -3
  78. data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +3 -1
  79. data/lib/oci/core/models/ingress_security_rule.rb +10 -3
  80. data/lib/oci/core/models/instance.rb +33 -7
  81. data/lib/oci/core/models/instance_console_connection.rb +15 -0
  82. data/lib/oci/core/models/instance_credentials.rb +5 -2
  83. data/lib/oci/core/models/instance_source_details.rb +3 -1
  84. data/lib/oci/core/models/instance_source_via_boot_volume_details.rb +2 -1
  85. data/lib/oci/core/models/instance_source_via_image_details.rb +2 -1
  86. data/lib/oci/core/models/internet_gateway.rb +20 -5
  87. data/lib/oci/core/models/ip_sec_connection.rb +23 -6
  88. data/lib/oci/core/models/ip_sec_connection_device_config.rb +7 -2
  89. data/lib/oci/core/models/ip_sec_connection_device_status.rb +7 -2
  90. data/lib/oci/core/models/launch_instance_details.rb +20 -3
  91. data/lib/oci/core/models/launch_options.rb +10 -4
  92. data/lib/oci/core/models/letter_of_authority.rb +10 -0
  93. data/lib/oci/core/models/local_peering_gateway.rb +29 -9
  94. data/lib/oci/core/models/port_range.rb +4 -2
  95. data/lib/oci/core/models/private_ip.rb +41 -1
  96. data/lib/oci/core/models/route_rule.rb +7 -2
  97. data/lib/oci/core/models/route_table.rb +22 -5
  98. data/lib/oci/core/models/security_list.rb +32 -8
  99. data/lib/oci/core/models/shape.rb +5 -1
  100. data/lib/oci/core/models/subnet.rb +38 -10
  101. data/lib/oci/core/models/tcp_options.rb +5 -0
  102. data/lib/oci/core/models/tunnel_config.rb +6 -2
  103. data/lib/oci/core/models/tunnel_status.rb +7 -1
  104. data/lib/oci/core/models/udp_options.rb +5 -0
  105. data/lib/oci/core/models/update_boot_volume_details.rb +1 -0
  106. data/lib/oci/core/models/update_console_history_details.rb +3 -0
  107. data/lib/oci/core/models/update_cpe_details.rb +1 -0
  108. data/lib/oci/core/models/update_cross_connect_details.rb +5 -1
  109. data/lib/oci/core/models/update_cross_connect_group_details.rb +1 -0
  110. data/lib/oci/core/models/update_dhcp_details.rb +4 -0
  111. data/lib/oci/core/models/update_drg_attachment_details.rb +1 -0
  112. data/lib/oci/core/models/update_drg_details.rb +1 -0
  113. data/lib/oci/core/models/update_image_details.rb +3 -0
  114. data/lib/oci/core/models/update_instance_details.rb +3 -0
  115. data/lib/oci/core/models/update_internet_gateway_details.rb +3 -1
  116. data/lib/oci/core/models/update_ip_sec_connection_details.rb +1 -0
  117. data/lib/oci/core/models/update_local_peering_gateway_details.rb +1 -0
  118. data/lib/oci/core/models/update_private_ip_details.rb +5 -0
  119. data/lib/oci/core/models/update_route_table_details.rb +4 -0
  120. data/lib/oci/core/models/update_security_list_details.rb +5 -0
  121. data/lib/oci/core/models/update_subnet_details.rb +3 -0
  122. data/lib/oci/core/models/update_vcn_details.rb +3 -0
  123. data/lib/oci/core/models/update_virtual_circuit_details.rb +7 -0
  124. data/lib/oci/core/models/update_vnic_details.rb +4 -1
  125. data/lib/oci/core/models/update_volume_backup_details.rb +3 -0
  126. data/lib/oci/core/models/update_volume_details.rb +3 -0
  127. data/lib/oci/core/models/vcn.rb +24 -4
  128. data/lib/oci/core/models/virtual_circuit.rb +41 -0
  129. data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +5 -1
  130. data/lib/oci/core/models/virtual_circuit_public_prefix.rb +8 -2
  131. data/lib/oci/core/models/vnic.rb +38 -9
  132. data/lib/oci/core/models/vnic_attachment.rb +21 -7
  133. data/lib/oci/core/models/volume.rb +28 -8
  134. data/lib/oci/core/models/volume_attachment.rb +25 -8
  135. data/lib/oci/core/models/volume_backup.rb +26 -5
  136. data/lib/oci/core/models/volume_source_details.rb +3 -0
  137. data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +3 -1
  138. data/lib/oci/core/models/volume_source_from_volume_details.rb +3 -1
  139. data/lib/oci/core/virtual_network_client.rb +19 -5
  140. data/lib/oci/database/database_client.rb +19 -5
  141. data/lib/oci/database/models/backup.rb +13 -0
  142. data/lib/oci/database/models/backup_summary.rb +13 -0
  143. data/lib/oci/database/models/create_backup_details.rb +4 -2
  144. data/lib/oci/database/models/create_data_guard_association_details.rb +18 -4
  145. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +5 -0
  146. data/lib/oci/database/models/create_database_details.rb +9 -2
  147. data/lib/oci/database/models/create_database_from_backup_details.rb +6 -3
  148. data/lib/oci/database/models/create_db_home_details.rb +5 -1
  149. data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +5 -1
  150. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +6 -1
  151. data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +4 -0
  152. data/lib/oci/database/models/data_guard_association.rb +32 -7
  153. data/lib/oci/database/models/data_guard_association_summary.rb +32 -7
  154. data/lib/oci/database/models/database.rb +22 -5
  155. data/lib/oci/database/models/database_summary.rb +22 -5
  156. data/lib/oci/database/models/db_backup_config.rb +5 -1
  157. data/lib/oci/database/models/db_home.rb +22 -5
  158. data/lib/oci/database/models/db_home_summary.rb +22 -5
  159. data/lib/oci/database/models/db_node.rb +17 -5
  160. data/lib/oci/database/models/db_node_summary.rb +17 -5
  161. data/lib/oci/database/models/db_system.rb +56 -12
  162. data/lib/oci/database/models/db_system_shape_summary.rb +11 -2
  163. data/lib/oci/database/models/db_system_summary.rb +56 -12
  164. data/lib/oci/database/models/db_version_summary.rb +8 -2
  165. data/lib/oci/database/models/failover_data_guard_association_details.rb +4 -1
  166. data/lib/oci/database/models/launch_db_system_details.rb +27 -8
  167. data/lib/oci/database/models/patch.rb +18 -4
  168. data/lib/oci/database/models/patch_details.rb +6 -0
  169. data/lib/oci/database/models/patch_history_entry.rb +12 -4
  170. data/lib/oci/database/models/patch_history_entry_summary.rb +12 -4
  171. data/lib/oci/database/models/patch_summary.rb +18 -4
  172. data/lib/oci/database/models/reinstate_data_guard_association_details.rb +4 -1
  173. data/lib/oci/database/models/restore_database_details.rb +4 -1
  174. data/lib/oci/database/models/switchover_data_guard_association_details.rb +4 -1
  175. data/lib/oci/database/models/update_database_details.rb +1 -0
  176. data/lib/oci/database/models/update_db_home_details.rb +3 -0
  177. data/lib/oci/database/models/update_db_system_details.rb +6 -0
  178. data/lib/oci/identity/identity.rb +3 -0
  179. data/lib/oci/identity/identity_client.rb +290 -70
  180. data/lib/oci/identity/models/add_user_to_group_details.rb +4 -2
  181. data/lib/oci/identity/models/api_key.rb +18 -0
  182. data/lib/oci/identity/models/availability_domain.rb +6 -0
  183. data/lib/oci/identity/models/compartment.rb +38 -10
  184. data/lib/oci/identity/models/create_api_key_details.rb +2 -1
  185. data/lib/oci/identity/models/create_compartment_details.rb +14 -7
  186. data/lib/oci/identity/models/create_customer_secret_key_details.rb +2 -1
  187. data/lib/oci/identity/models/create_dynamic_group_details.rb +160 -0
  188. data/lib/oci/identity/models/create_group_details.rb +14 -7
  189. data/lib/oci/identity/models/create_identity_provider_details.rb +19 -9
  190. data/lib/oci/identity/models/create_idp_group_mapping_details.rb +4 -2
  191. data/lib/oci/identity/models/create_policy_details.rb +18 -9
  192. data/lib/oci/identity/models/create_region_subscription_details.rb +2 -1
  193. data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +10 -2
  194. data/lib/oci/identity/models/create_swift_password_details.rb +2 -1
  195. data/lib/oci/identity/models/create_tag_details.rb +12 -6
  196. data/lib/oci/identity/models/create_tag_namespace_details.rb +14 -7
  197. data/lib/oci/identity/models/create_user_details.rb +14 -7
  198. data/lib/oci/identity/models/customer_secret_key.rb +16 -0
  199. data/lib/oci/identity/models/customer_secret_key_summary.rb +10 -0
  200. data/lib/oci/identity/models/dynamic_group.rb +239 -0
  201. data/lib/oci/identity/models/group.rb +35 -11
  202. data/lib/oci/identity/models/identity_provider.rb +36 -12
  203. data/lib/oci/identity/models/idp_group_mapping.rb +27 -7
  204. data/lib/oci/identity/models/policy.rb +38 -11
  205. data/lib/oci/identity/models/region.rb +10 -0
  206. data/lib/oci/identity/models/region_subscription.rb +16 -5
  207. data/lib/oci/identity/models/saml2_identity_provider.rb +20 -3
  208. data/lib/oci/identity/models/swift_password.rb +17 -1
  209. data/lib/oci/identity/models/tag.rb +30 -13
  210. data/lib/oci/identity/models/tag_namespace.rb +25 -11
  211. data/lib/oci/identity/models/tag_namespace_summary.rb +23 -10
  212. data/lib/oci/identity/models/tag_summary.rb +21 -8
  213. data/lib/oci/identity/models/tenancy.rb +21 -4
  214. data/lib/oci/identity/models/ui_password.rb +10 -0
  215. data/lib/oci/identity/models/update_compartment_details.rb +10 -4
  216. data/lib/oci/identity/models/update_customer_secret_key_details.rb +1 -0
  217. data/lib/oci/identity/models/update_dynamic_group_details.rb +134 -0
  218. data/lib/oci/identity/models/update_group_details.rb +9 -4
  219. data/lib/oci/identity/models/update_identity_provider_details.rb +12 -5
  220. data/lib/oci/identity/models/update_idp_group_mapping_details.rb +2 -0
  221. data/lib/oci/identity/models/update_policy_details.rb +12 -5
  222. data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +5 -0
  223. data/lib/oci/identity/models/update_state_details.rb +2 -1
  224. data/lib/oci/identity/models/update_swift_password_details.rb +1 -0
  225. data/lib/oci/identity/models/update_tag_details.rb +15 -7
  226. data/lib/oci/identity/models/update_tag_namespace_details.rb +15 -7
  227. data/lib/oci/identity/models/update_user_details.rb +9 -4
  228. data/lib/oci/identity/models/user.rb +38 -11
  229. data/lib/oci/identity/models/user_group_membership.rb +16 -6
  230. data/lib/oci/load_balancer/load_balancer.rb +1 -0
  231. data/lib/oci/load_balancer/load_balancer_client.rb +24 -9
  232. data/lib/oci/load_balancer/models/backend.rb +20 -10
  233. data/lib/oci/load_balancer/models/backend_details.rb +12 -5
  234. data/lib/oci/load_balancer/models/backend_health.rb +6 -2
  235. data/lib/oci/load_balancer/models/backend_set.rb +14 -2
  236. data/lib/oci/load_balancer/models/backend_set_details.rb +11 -1
  237. data/lib/oci/load_balancer/models/backend_set_health.rb +15 -5
  238. data/lib/oci/load_balancer/models/certificate.rb +10 -3
  239. data/lib/oci/load_balancer/models/certificate_details.rb +10 -1
  240. data/lib/oci/load_balancer/models/connection_configuration.rb +157 -0
  241. data/lib/oci/load_balancer/models/create_backend_details.rb +15 -5
  242. data/lib/oci/load_balancer/models/create_backend_set_details.rb +13 -2
  243. data/lib/oci/load_balancer/models/create_certificate_details.rb +10 -1
  244. data/lib/oci/load_balancer/models/create_listener_details.rb +28 -5
  245. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +14 -5
  246. data/lib/oci/load_balancer/models/health_check_result.rb +10 -4
  247. data/lib/oci/load_balancer/models/health_checker.rb +15 -4
  248. data/lib/oci/load_balancer/models/health_checker_details.rb +10 -1
  249. data/lib/oci/load_balancer/models/ip_address.rb +5 -2
  250. data/lib/oci/load_balancer/models/listener.rb +28 -5
  251. data/lib/oci/load_balancer/models/listener_details.rb +23 -4
  252. data/lib/oci/load_balancer/models/load_balancer.rb +30 -7
  253. data/lib/oci/load_balancer/models/load_balancer_health.rb +15 -5
  254. data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +5 -2
  255. data/lib/oci/load_balancer/models/load_balancer_policy.rb +6 -1
  256. data/lib/oci/load_balancer/models/load_balancer_protocol.rb +3 -1
  257. data/lib/oci/load_balancer/models/load_balancer_shape.rb +8 -1
  258. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +14 -2
  259. data/lib/oci/load_balancer/models/ssl_configuration.rb +11 -4
  260. data/lib/oci/load_balancer/models/ssl_configuration_details.rb +6 -2
  261. data/lib/oci/load_balancer/models/update_backend_details.rb +12 -7
  262. data/lib/oci/load_balancer/models/update_backend_set_details.rb +12 -1
  263. data/lib/oci/load_balancer/models/update_health_checker_details.rb +16 -7
  264. data/lib/oci/load_balancer/models/update_listener_details.rb +23 -4
  265. data/lib/oci/load_balancer/models/update_load_balancer_details.rb +3 -1
  266. data/lib/oci/load_balancer/models/work_request.rb +20 -6
  267. data/lib/oci/load_balancer/models/work_request_error.rb +5 -1
  268. data/lib/oci/object_storage/models/bucket.rb +27 -8
  269. data/lib/oci/object_storage/models/bucket_summary.rb +16 -6
  270. data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +7 -1
  271. data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +8 -2
  272. data/lib/oci/object_storage/models/create_bucket_details.rb +15 -4
  273. data/lib/oci/object_storage/models/create_multipart_upload_details.rb +10 -1
  274. data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +7 -3
  275. data/lib/oci/object_storage/models/list_objects.rb +8 -1
  276. data/lib/oci/object_storage/models/multipart_upload.rb +20 -5
  277. data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +13 -4
  278. data/lib/oci/object_storage/models/namespace_metadata.rb +8 -3
  279. data/lib/oci/object_storage/models/object_summary.rb +9 -1
  280. data/lib/oci/object_storage/models/preauthenticated_request.rb +20 -6
  281. data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +13 -5
  282. data/lib/oci/object_storage/models/rename_object_details.rb +11 -2
  283. data/lib/oci/object_storage/models/restore_objects_details.rb +2 -1
  284. data/lib/oci/object_storage/models/update_bucket_details.rb +13 -2
  285. data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +5 -0
  286. data/lib/oci/object_storage/object_storage_client.rb +26 -12
  287. data/lib/oci/regions.rb +8 -1
  288. data/lib/oci/signer.rb +5 -124
  289. data/lib/oci/version.rb +1 -1
  290. metadata +31 -2
@@ -3,6 +3,8 @@
3
3
  require 'date'
4
4
 
5
5
  module OCI
6
+ # Get summary information about pre-authenticated requests.
7
+ #
6
8
  class ObjectStorage::Models::PreauthenticatedRequestSummary
7
9
 
8
10
  ACCESS_TYPE_ENUM = [ACCESS_TYPE_OBJECT_READ = 'ObjectRead',
@@ -11,11 +13,11 @@ module OCI
11
13
  ACCESS_TYPE_ANY_OBJECT_WRITE = 'AnyObjectWrite',
12
14
  ACCESS_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
13
15
 
14
- # The unique identifier to use when directly addressing the pre-authenticated request.
16
+ # **[Required]** The unique identifier to use when directly addressing the pre-authenticated request.
15
17
  # @return [String]
16
18
  attr_accessor :id
17
19
 
18
- # The user-provided name of the pre-authenticated request.
20
+ # **[Required]** The user-provided name of the pre-authenticated request.
19
21
  # @return [String]
20
22
  attr_accessor :name
21
23
 
@@ -23,16 +25,16 @@ module OCI
23
25
  # @return [String]
24
26
  attr_accessor :object_name
25
27
 
26
- # The operation that can be performed on this resource.
28
+ # **[Required]** The operation that can be performed on this resource.
27
29
  # @return [String]
28
30
  attr_accessor :access_type
29
31
 
30
- # The expiration date for the pre-authenticated request as per [RFC 3339](https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid.
32
+ # **[Required]** The expiration date for the pre-authenticated request as per [RFC 3339](https://tools.ietf.org/rfc/rfc3339). After this date the pre-authenticated request will no longer be valid.
31
33
  #
32
34
  # @return [DateTime]
33
35
  attr_accessor :time_expires
34
36
 
35
- # The date when the pre-authenticated request was created as per [RFC 3339](https://tools.ietf.org/rfc/rfc3339).
37
+ # **[Required]** The date when the pre-authenticated request was created as per [RFC 3339](https://tools.ietf.org/rfc/rfc3339).
36
38
  #
37
39
  # @return [DateTime]
38
40
  attr_accessor :time_created
@@ -40,6 +42,12 @@ module OCI
40
42
 
41
43
  # Initializes the object
42
44
  # @param [Hash] attributes Model attributes in the form of hash
45
+ # @option attributes [String] :id The value to assign to the {#id} property
46
+ # @option attributes [String] :name The value to assign to the {#name} property
47
+ # @option attributes [String] :objectName The value to assign to the {#object_name} property
48
+ # @option attributes [String] :accessType The value to assign to the {#access_type} property
49
+ # @option attributes [DateTime] :timeExpires The value to assign to the {#time_expires} property
50
+ # @option attributes [DateTime] :timeCreated The value to assign to the {#time_created} property
43
51
  def initialize(attributes = {})
44
52
  return unless attributes.is_a?(Hash)
45
53
 
@@ -3,12 +3,16 @@
3
3
  require 'date'
4
4
 
5
5
  module OCI
6
+ # To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
7
+ # talk to an administrator. If you're an administrator who needs to write policies to give users access, see
8
+ # [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
9
+ #
6
10
  class ObjectStorage::Models::RenameObjectDetails
7
- # The name of the source object to be renamed.
11
+ # **[Required]** The name of the source object to be renamed.
8
12
  # @return [String]
9
13
  attr_accessor :source_name
10
14
 
11
- # The new name of the source object.
15
+ # **[Required]** The new name of the source object.
12
16
  # @return [String]
13
17
  attr_accessor :new_name
14
18
 
@@ -27,6 +31,11 @@ module OCI
27
31
 
28
32
  # Initializes the object
29
33
  # @param [Hash] attributes Model attributes in the form of hash
34
+ # @option attributes [String] :sourceName The value to assign to the {#source_name} property
35
+ # @option attributes [String] :newName The value to assign to the {#new_name} property
36
+ # @option attributes [String] :srcObjIfMatchETag The value to assign to the {#src_obj_if_match_e_tag} property
37
+ # @option attributes [String] :newObjIfMatchETag The value to assign to the {#new_obj_if_match_e_tag} property
38
+ # @option attributes [String] :newObjIfNoneMatchETag The value to assign to the {#new_obj_if_none_match_e_tag} property
30
39
  def initialize(attributes = {})
31
40
  return unless attributes.is_a?(Hash)
32
41
 
@@ -4,13 +4,14 @@ require 'date'
4
4
 
5
5
  module OCI
6
6
  class ObjectStorage::Models::RestoreObjectsDetails
7
- # A object which was in an archived state and need to be restored.
7
+ # **[Required]** A object which was in an archived state and need to be restored.
8
8
  # @return [String]
9
9
  attr_accessor :object_name
10
10
 
11
11
 
12
12
  # Initializes the object
13
13
  # @param [Hash] attributes Model attributes in the form of hash
14
+ # @option attributes [String] :objectName The value to assign to the {#object_name} property
14
15
  def initialize(attributes = {})
15
16
  return unless attributes.is_a?(Hash)
16
17
 
@@ -3,10 +3,15 @@
3
3
  require 'date'
4
4
 
5
5
  module OCI
6
+ # To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
7
+ # talk to an administrator. If you're an administrator who needs to write policies to give users access, see
8
+ # [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
9
+ #
6
10
  class ObjectStorage::Models::UpdateBucketDetails
7
11
 
8
12
  PUBLIC_ACCESS_TYPE_ENUM = [PUBLIC_ACCESS_TYPE_NO_PUBLIC_ACCESS = 'NoPublicAccess',
9
- PUBLIC_ACCESS_TYPE_OBJECT_READ = 'ObjectRead']
13
+ PUBLIC_ACCESS_TYPE_OBJECT_READ = 'ObjectRead',
14
+ PUBLIC_ACCESS_TYPE_OBJECT_READ_WITHOUT_LIST = 'ObjectReadWithoutList']
10
15
 
11
16
  # The namespace in which the bucket lives.
12
17
  # @return [String]
@@ -28,7 +33,8 @@ module OCI
28
33
 
29
34
  # The type of public access enabled on this bucket. A bucket is set to `NoPublicAccess` by default, which only allows an
30
35
  # authenticated caller to access the bucket and its contents. When `ObjectRead` is enabled on the bucket, public access
31
- # is allowed for the `GetObject`, `HeadObject`, and `ListObjects` operations.
36
+ # is allowed for the `GetObject`, `HeadObject`, and `ListObjects` operations. When `ObjectReadWithoutList` is enabled
37
+ # on the bucket, public access is allowed for the `GetObject` and `HeadObject` operations.
32
38
  #
33
39
  # @return [String]
34
40
  attr_accessor :public_access_type
@@ -36,6 +42,11 @@ module OCI
36
42
 
37
43
  # Initializes the object
38
44
  # @param [Hash] attributes Model attributes in the form of hash
45
+ # @option attributes [String] :namespace The value to assign to the {#namespace} property
46
+ # @option attributes [String] :compartmentId The value to assign to the {#compartment_id} property
47
+ # @option attributes [String] :name The value to assign to the {#name} property
48
+ # @option attributes [Hash<String, String>] :metadata The value to assign to the {#metadata} property
49
+ # @option attributes [String] :publicAccessType The value to assign to the {#public_access_type} property
39
50
  def initialize(attributes = {})
40
51
  return unless attributes.is_a?(Hash)
41
52
 
@@ -3,6 +3,9 @@
3
3
  require 'date'
4
4
 
5
5
  module OCI
6
+ # An UpdateNamespaceMetadataDetails is used for update NamespaceMetadata. To be able to upate the NamespaceMetadata, a user
7
+ # must have NAMESPACE_UPDATE permission.
8
+ #
6
9
  class ObjectStorage::Models::UpdateNamespaceMetadataDetails
7
10
  # The update compartment id for an S3 client if this field is set.
8
11
  # @return [String]
@@ -15,6 +18,8 @@ module OCI
15
18
 
16
19
  # Initializes the object
17
20
  # @param [Hash] attributes Model attributes in the form of hash
21
+ # @option attributes [String] :defaultS3CompartmentId The value to assign to the {#default_s3_compartment_id} property
22
+ # @option attributes [String] :defaultSwiftCompartmentId The value to assign to the {#default_swift_compartment_id} property
18
23
  def initialize(attributes = {})
19
24
  return unless attributes.is_a?(Hash)
20
25
 
@@ -28,15 +28,29 @@ module OCI
28
28
  # @param [Config] config A Config object.
29
29
  # @param [String] region A region used to determine the service endpoint. This will usually
30
30
  # correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
31
- #
32
- def initialize(config:nil, region:nil)
33
- config ||= OCI.config
34
- config.validate
31
+ # @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
32
+ # a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
33
+ # so that the instance principals signer can be provided to the client
34
+ def initialize(config:nil, region:nil, signer:nil)
35
+ # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
36
+ # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
37
+ # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
38
+ # pass it to this constructor.
39
+ #
40
+ # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
41
+ # so try and load the config from the default file.
42
+ config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
43
+ config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
44
+ config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
45
+
46
+ if signer.nil?
47
+ signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content, signing_strategy: Signer::OBJECT_STORAGE)
48
+ end
35
49
 
36
- signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content, signing_strategy: Signer::OBJECT_STORAGE)
37
50
  @api_client = ApiClient.new(config, signer)
38
51
 
39
52
  region ||= config.region
53
+ region ||= signer.region if signer.respond_to?(:region)
40
54
  self.region = region
41
55
  end
42
56
 
@@ -452,8 +466,8 @@ module OCI
452
466
  :return_type => 'OCI::ObjectStorage::Models::Bucket')
453
467
  end
454
468
 
455
- # Gets the name of the namespace for the user making the request. An account name must be unique, must start with a
456
- # letter, and can have up to 15 lowercase letters and numbers. You cannot use spaces or special characters.
469
+ # Namespaces are unique. Namespaces are either the tenancy name or a random string automatically generated during
470
+ # account creation. You cannot edit a namespace.
457
471
  #
458
472
  # @param [Hash] opts the optional parameters
459
473
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -761,7 +775,7 @@ module OCI
761
775
  # [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
762
776
  #
763
777
  # @param [String] namespace_name The top-level namespace used for the request.
764
- # @param [String] compartment_id The ID of the compartment in which to create the bucket.
778
+ # @param [String] compartment_id The ID of the compartment in which to list buckets.
765
779
  # @param [Hash] opts the optional parameters
766
780
  # @option opts [Integer] :limit The maximum number of items to return.
767
781
  # @option opts [String] :page The page at which to start retrieving results.
@@ -906,10 +920,10 @@ module OCI
906
920
  # @option opts [String] :_end Object names returned by a list query must be strictly less than this parameter.
907
921
  # @option opts [Integer] :limit The maximum number of items to return.
908
922
  # @option opts [String] :delimiter When this parameter is set, only objects whose names do not contain the delimiter character
909
- # (after an optionally specified prefix) are returned. Scanned objects whose names contain the
910
- # delimiter have part of their name up to the last occurrence of the delimiter (after the optional
911
- # prefix) returned as a set of prefixes. Note that only '/' is a supported delimiter character at
912
- # this time.
923
+ # (after an optionally specified prefix) are returned in the objects key of the response body.
924
+ # Scanned objects whose names contain the delimiter have the part of their name up to the first
925
+ # occurrence of the delimiter (including the optional prefix) returned as a set of prefixes.
926
+ # Note that only '/' is a supported delimiter character at this time.
913
927
  #
914
928
  # @option opts [String] :fields Object summary in list of objects includes the 'name' field. This parameter can also include 'size'
915
929
  # (object size in bytes), 'md5', and 'timeCreated' (object creation date and time) fields.
@@ -9,6 +9,12 @@ module OCI
9
9
  REGION_EU_FRANKFURT_1 = 'eu-frankfurt-1'.freeze
10
10
  ].freeze
11
11
 
12
+ REGION_SHORT_NAMES_TO_LONG_NAMES = {
13
+ 'phx': REGION_US_PHOENIX_1,
14
+ 'iad': REGION_US_ASHBURN_1,
15
+ 'fra': REGION_EU_FRANKFURT_1
16
+ }.freeze
17
+
12
18
  SERVICE_ENDPOINT_PREFIX_MAPPING = {
13
19
  BlockstorageClient: 'iaas',
14
20
  ComputeClient: 'iaas',
@@ -17,7 +23,8 @@ module OCI
17
23
  LoadBalancerClient: 'iaas',
18
24
  ObjectStorageClient: 'objectstorage',
19
25
  DatabaseClient: 'database',
20
- AuditClient: 'audit'
26
+ AuditClient: 'audit',
27
+ Auth: 'auth'
21
28
  }.freeze
22
29
 
23
30
  # Returns an endpoint for the given region and service.
@@ -8,16 +8,15 @@ require 'time'
8
8
  require 'uri'
9
9
  require 'cgi'
10
10
 
11
+ require_relative 'base_signer'
12
+
11
13
  module OCI
12
14
 
13
15
  # Used to sign HTTP requests as required by Oracle Cloud Infrastructure.
14
- class Signer
16
+ class Signer < BaseSigner
15
17
  # enum to define the signing strategy
16
18
  SIGNING_STRATEGY_ENUM = [STANDARD = 'standard', OBJECT_STORAGE = 'object_storage']
17
19
 
18
- # The Oracle Cloud Infrastructure API signature version
19
- SIGNATURE_VERSION = "1"
20
-
21
20
  # Creates a Signer
22
21
  #
23
22
  # @param [String] user OCID of the user to be used for authentication, for example "ocidv1:user:oc1:phx:1460406592659:aaaaaaaawcbqrkycbolrirg2n3xjl5fyxe".
@@ -33,126 +32,8 @@ module OCI
33
32
  fail 'Missing required parameter tenancy.' unless tenancy
34
33
  fail 'Missing required parameter private_key_file or private_key_content.' unless private_key_file || private_key_content
35
34
 
36
- @key_id = tenancy + "/" + user + "/" + fingerprint
37
- @private_key_file = private_key_file
38
- @private_key_content = private_key_content
39
- @pass_phrase = pass_phrase
40
- @signing_strategy = signing_strategy
41
- end
42
-
43
- # Generates the correct signature and adds it to the
44
- # headers that are passed in. Also injects any required
45
- # headers that might be missing.
46
- #
47
- # @param [Symbol] method The HTTP method, such as :get or :post.
48
- # @param [String] uri The URI, such as 'https://iaas.us-phoenix-1.oraclecloud.com/20160918/volumeAttachments/'
49
- # @param [Hash] headers A hash of headers
50
- # @param [String] body The request body
51
- def sign(method, uri, headers, body)
52
- method = method.to_sym.downcase
53
- uri = URI(uri)
54
- path = uri.query.nil? ? uri.path : "#{uri.path}?#{uri.query}"
55
- inject_missing_headers(method, headers, body, uri)
56
- signature = compute_signature(headers, method, path)
57
- unless signature.nil?
58
- inject_authorization_header(headers, method, signature)
59
- end
60
- end
61
-
62
- private
63
-
64
- GENERIC_HEADERS = [:"date", :"(request-target)", :"host"]
65
- BODY_HEADERS = [:"content-length", :"content-type", :"x-content-sha256"]
66
-
67
- OPERATION_HEADER_MAPPING = {
68
- options: [],
69
- get: GENERIC_HEADERS,
70
- head: GENERIC_HEADERS,
71
- delete: GENERIC_HEADERS,
72
- put: GENERIC_HEADERS + BODY_HEADERS,
73
- post: GENERIC_HEADERS + BODY_HEADERS,
74
- patch: GENERIC_HEADERS + BODY_HEADERS
75
- }.freeze
76
-
77
- def inject_missing_headers(method, headers, body, uri)
78
-
79
- headers["date"] ||= Time.now.utc.httpdate
80
- headers["accept"] ||= "*/*"
81
- headers["host"] ||= uri.host
82
-
83
- # For object storage service's put method, we don't need to set content type
84
- if method != :put || @signing_strategy != OBJECT_STORAGE
85
- headers["content-type"] ||= "application/json"
86
- else
87
- headers[:'Content-Type'] ||= 'application/octet-stream'
88
- end
89
-
90
- if method == :put || method == :post
91
- body ||= ''
92
-
93
- # For object storage service's put method, we don't need to set content length and x-content sha256
94
- if method != :put || @signing_strategy != OBJECT_STORAGE
95
- headers["content-length"] ||= body.length.to_s
96
- headers["x-content-sha256"] ||= Digest::SHA256.base64digest(body)
97
- else
98
- if body.respond_to?(:read) && body.respond_to?(:write)
99
- headers['Content-Length'] ||= body.respond_to?('size') ? body.size : body.stat.size
100
- else
101
- headers['Content-Length'] ||= body.length.to_s
102
- end
103
- end
104
- end
105
- end
106
-
107
- def inject_authorization_header(headers, method, signature)
108
-
109
- if method == :put && @signing_strategy == OBJECT_STORAGE
110
- header_mapping = GENERIC_HEADERS
111
- else
112
- header_mapping = OPERATION_HEADER_MAPPING[method]
113
- end
114
-
115
- signed_headers = header_mapping.map(&:to_s).join(" ")
116
- headers["authorization"] = [
117
- %(Signature headers="#{signed_headers}"),
118
- %(keyId="#{@key_id}"),
119
- %(algorithm="rsa-sha256"),
120
- %(signature="#{signature}"),
121
- %(version="#{SIGNATURE_VERSION}")
122
- ].join(",")
123
- end
124
-
125
- def compute_signature(headers, method, path)
126
- if method == :put && @signing_strategy == OBJECT_STORAGE
127
- header_mapping = GENERIC_HEADERS
128
- else
129
- header_mapping = OPERATION_HEADER_MAPPING[method]
130
- end
131
-
132
- return if header_mapping.empty?
133
- signing_string = header_mapping.map do |header|
134
- if header == :"(request-target)"
135
- "#{header}: #{method.downcase} #{path}"
136
- else
137
- "#{header}: #{headers[header.to_s]}"
138
- end
139
- end.join("\n")
140
-
141
- signature = private_key.sign(OpenSSL::Digest::SHA256.new, signing_string.encode("ascii"))
142
- Base64.strict_encode64(signature)
143
- end
144
-
145
- def private_key
146
- # If a pass_phase was not provided and the key is in fact encrypted, then passing in
147
- # nil for the passphrase here will show a user prompt and block until there is a response.
148
- # Passing in an empty string will work for some versions of Ruby's openssl wrapper, but
149
- # other versions will enforce the 4 character password minimum at this point. Passing in
150
- # a dummy password that's greater than 4 characters avoids both problems, and will
151
- # always succeed if the file is not encrypted.
152
- @private_key ||= OpenSSL::PKey::RSA.new(
153
- @private_key_content.nil? ? File.read(@private_key_file) : @private_key_content,
154
- @pass_phrase || SecureRandom.uuid)
35
+ private_key = private_key_content.nil? ? File.read(private_key_file) : private_key_content
36
+ super("#{tenancy}/#{user}/#{fingerprint}", private_key, pass_phrase: pass_phrase, signing_strategy: signing_strategy)
155
37
  end
156
38
  end
157
-
158
39
  end
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  module OCI
4
- VERSION = '2.0.5'.freeze
4
+ VERSION = '2.0.6'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oci
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oracle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-11 00:00:00.000000000 Z
11
+ date: 2018-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -50,6 +50,20 @@ dependencies:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
52
  version: 3.0.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: jwt
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '2.1'
60
+ type: :runtime
61
+ prerelease: false
62
+ version_requirements: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '2.1'
53
67
  - !ruby/object:Gem::Dependency
54
68
  name: webmock
55
69
  requirement: !ruby/object:Gem::Requirement
@@ -139,6 +153,17 @@ files:
139
153
  - "./lib/oci/audit/models/configuration.rb"
140
154
  - "./lib/oci/audit/models/update_configuration_details.rb"
141
155
  - "./lib/oci/audit/util.rb"
156
+ - "./lib/oci/auth/auth.rb"
157
+ - "./lib/oci/auth/federation_client.rb"
158
+ - "./lib/oci/auth/internal/auth_token_request_signer.rb"
159
+ - "./lib/oci/auth/security_token_container.rb"
160
+ - "./lib/oci/auth/session_key_supplier.rb"
161
+ - "./lib/oci/auth/signers/instance_principals_security_token_signer.rb"
162
+ - "./lib/oci/auth/signers/security_token_signer.rb"
163
+ - "./lib/oci/auth/signers/x509_federation_client_based_security_token_signer.rb"
164
+ - "./lib/oci/auth/url_based_certificate_retriever.rb"
165
+ - "./lib/oci/auth/util.rb"
166
+ - "./lib/oci/base_signer.rb"
142
167
  - "./lib/oci/config.rb"
143
168
  - "./lib/oci/config_file_loader.rb"
144
169
  - "./lib/oci/core/blockstorage_client.rb"
@@ -314,6 +339,7 @@ files:
314
339
  - "./lib/oci/identity/models/create_api_key_details.rb"
315
340
  - "./lib/oci/identity/models/create_compartment_details.rb"
316
341
  - "./lib/oci/identity/models/create_customer_secret_key_details.rb"
342
+ - "./lib/oci/identity/models/create_dynamic_group_details.rb"
317
343
  - "./lib/oci/identity/models/create_group_details.rb"
318
344
  - "./lib/oci/identity/models/create_identity_provider_details.rb"
319
345
  - "./lib/oci/identity/models/create_idp_group_mapping_details.rb"
@@ -326,6 +352,7 @@ files:
326
352
  - "./lib/oci/identity/models/create_user_details.rb"
327
353
  - "./lib/oci/identity/models/customer_secret_key.rb"
328
354
  - "./lib/oci/identity/models/customer_secret_key_summary.rb"
355
+ - "./lib/oci/identity/models/dynamic_group.rb"
329
356
  - "./lib/oci/identity/models/group.rb"
330
357
  - "./lib/oci/identity/models/identity_provider.rb"
331
358
  - "./lib/oci/identity/models/idp_group_mapping.rb"
@@ -342,6 +369,7 @@ files:
342
369
  - "./lib/oci/identity/models/ui_password.rb"
343
370
  - "./lib/oci/identity/models/update_compartment_details.rb"
344
371
  - "./lib/oci/identity/models/update_customer_secret_key_details.rb"
372
+ - "./lib/oci/identity/models/update_dynamic_group_details.rb"
345
373
  - "./lib/oci/identity/models/update_group_details.rb"
346
374
  - "./lib/oci/identity/models/update_identity_provider_details.rb"
347
375
  - "./lib/oci/identity/models/update_idp_group_mapping_details.rb"
@@ -367,6 +395,7 @@ files:
367
395
  - "./lib/oci/load_balancer/models/backend_set_health.rb"
368
396
  - "./lib/oci/load_balancer/models/certificate.rb"
369
397
  - "./lib/oci/load_balancer/models/certificate_details.rb"
398
+ - "./lib/oci/load_balancer/models/connection_configuration.rb"
370
399
  - "./lib/oci/load_balancer/models/create_backend_details.rb"
371
400
  - "./lib/oci/load_balancer/models/create_backend_set_details.rb"
372
401
  - "./lib/oci/load_balancer/models/create_certificate_details.rb"