oci 2.0.1 → 2.0.2

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 (248) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/lib/oci.rb +2 -1
  4. data/lib/oci/audit/audit.rb +19 -0
  5. data/lib/oci/audit/audit_client.rb +176 -0
  6. data/lib/oci/audit/models/audit_event.rb +307 -0
  7. data/lib/oci/audit/models/configuration.rb +120 -0
  8. data/lib/oci/audit/models/update_configuration_details.rb +120 -0
  9. data/lib/oci/audit/util.rb +1 -0
  10. data/lib/oci/core/blockstorage_client.rb +69 -1
  11. data/lib/oci/core/compute_client.rb +106 -16
  12. data/lib/oci/core/core.rb +3 -0
  13. data/lib/oci/core/models/attach_i_scsi_volume_details.rb +2 -2
  14. data/lib/oci/core/models/attach_vnic_details.rb +2 -2
  15. data/lib/oci/core/models/attach_volume_details.rb +2 -2
  16. data/lib/oci/core/models/capture_console_history_details.rb +2 -2
  17. data/lib/oci/core/models/console_history.rb +2 -2
  18. data/lib/oci/core/models/cpe.rb +2 -2
  19. data/lib/oci/core/models/create_cpe_details.rb +2 -2
  20. data/lib/oci/core/models/create_cross_connect_details.rb +2 -2
  21. data/lib/oci/core/models/create_cross_connect_group_details.rb +2 -2
  22. data/lib/oci/core/models/create_dhcp_details.rb +2 -2
  23. data/lib/oci/core/models/create_drg_attachment_details.rb +2 -2
  24. data/lib/oci/core/models/create_drg_details.rb +2 -2
  25. data/lib/oci/core/models/create_image_details.rb +2 -2
  26. data/lib/oci/core/models/create_instance_console_connection_details.rb +2 -2
  27. data/lib/oci/core/models/create_internet_gateway_details.rb +2 -2
  28. data/lib/oci/core/models/create_ip_sec_connection_details.rb +2 -2
  29. data/lib/oci/core/models/create_private_ip_details.rb +2 -2
  30. data/lib/oci/core/models/create_route_table_details.rb +2 -2
  31. data/lib/oci/core/models/create_security_list_details.rb +2 -2
  32. data/lib/oci/core/models/create_subnet_details.rb +2 -2
  33. data/lib/oci/core/models/create_vcn_details.rb +2 -2
  34. data/lib/oci/core/models/create_virtual_circuit_details.rb +5 -6
  35. data/lib/oci/core/models/create_vnic_details.rb +2 -2
  36. data/lib/oci/core/models/create_volume_backup_details.rb +2 -2
  37. data/lib/oci/core/models/create_volume_details.rb +20 -4
  38. data/lib/oci/core/models/cross_connect.rb +2 -2
  39. data/lib/oci/core/models/cross_connect_group.rb +2 -2
  40. data/lib/oci/core/models/cross_connect_location.rb +2 -2
  41. data/lib/oci/core/models/cross_connect_mapping.rb +2 -2
  42. data/lib/oci/core/models/cross_connect_port_speed_shape.rb +2 -2
  43. data/lib/oci/core/models/cross_connect_status.rb +2 -2
  44. data/lib/oci/core/models/dhcp_dns_option.rb +2 -2
  45. data/lib/oci/core/models/dhcp_option.rb +2 -2
  46. data/lib/oci/core/models/dhcp_options.rb +2 -2
  47. data/lib/oci/core/models/dhcp_search_domain_option.rb +2 -2
  48. data/lib/oci/core/models/drg.rb +2 -2
  49. data/lib/oci/core/models/drg_attachment.rb +2 -2
  50. data/lib/oci/core/models/egress_security_rule.rb +2 -2
  51. data/lib/oci/core/models/export_image_details.rb +3 -3
  52. data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +5 -5
  53. data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +3 -3
  54. data/lib/oci/core/models/fast_connect_provider_service.rb +2 -2
  55. data/lib/oci/core/models/i_scsi_volume_attachment.rb +2 -2
  56. data/lib/oci/core/models/icmp_options.rb +2 -2
  57. data/lib/oci/core/models/image.rb +2 -2
  58. data/lib/oci/core/models/image_source_details.rb +3 -3
  59. data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +5 -5
  60. data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +3 -3
  61. data/lib/oci/core/models/ingress_security_rule.rb +2 -2
  62. data/lib/oci/core/models/instance.rb +4 -4
  63. data/lib/oci/core/models/instance_console_connection.rb +2 -2
  64. data/lib/oci/core/models/instance_credentials.rb +2 -2
  65. data/lib/oci/core/models/internet_gateway.rb +2 -2
  66. data/lib/oci/core/models/ip_sec_connection.rb +2 -2
  67. data/lib/oci/core/models/ip_sec_connection_device_config.rb +2 -2
  68. data/lib/oci/core/models/ip_sec_connection_device_status.rb +2 -2
  69. data/lib/oci/core/models/launch_instance_details.rb +4 -4
  70. data/lib/oci/core/models/letter_of_authority.rb +2 -2
  71. data/lib/oci/core/models/port_range.rb +2 -2
  72. data/lib/oci/core/models/private_ip.rb +2 -2
  73. data/lib/oci/core/models/route_rule.rb +2 -2
  74. data/lib/oci/core/models/route_table.rb +2 -2
  75. data/lib/oci/core/models/security_list.rb +2 -2
  76. data/lib/oci/core/models/shape.rb +2 -2
  77. data/lib/oci/core/models/subnet.rb +2 -2
  78. data/lib/oci/core/models/tcp_options.rb +2 -2
  79. data/lib/oci/core/models/tunnel_config.rb +2 -2
  80. data/lib/oci/core/models/tunnel_status.rb +2 -2
  81. data/lib/oci/core/models/udp_options.rb +2 -2
  82. data/lib/oci/core/models/update_console_history_details.rb +2 -2
  83. data/lib/oci/core/models/update_cpe_details.rb +2 -2
  84. data/lib/oci/core/models/update_cross_connect_details.rb +2 -2
  85. data/lib/oci/core/models/update_cross_connect_group_details.rb +2 -2
  86. data/lib/oci/core/models/update_dhcp_details.rb +2 -2
  87. data/lib/oci/core/models/update_drg_attachment_details.rb +2 -2
  88. data/lib/oci/core/models/update_drg_details.rb +2 -2
  89. data/lib/oci/core/models/update_image_details.rb +2 -2
  90. data/lib/oci/core/models/update_instance_details.rb +2 -2
  91. data/lib/oci/core/models/update_internet_gateway_details.rb +2 -2
  92. data/lib/oci/core/models/update_ip_sec_connection_details.rb +2 -2
  93. data/lib/oci/core/models/update_private_ip_details.rb +2 -2
  94. data/lib/oci/core/models/update_route_table_details.rb +2 -2
  95. data/lib/oci/core/models/update_security_list_details.rb +2 -2
  96. data/lib/oci/core/models/update_subnet_details.rb +2 -2
  97. data/lib/oci/core/models/update_vcn_details.rb +2 -2
  98. data/lib/oci/core/models/update_virtual_circuit_details.rb +2 -3
  99. data/lib/oci/core/models/update_vnic_details.rb +2 -2
  100. data/lib/oci/core/models/update_volume_backup_details.rb +2 -2
  101. data/lib/oci/core/models/update_volume_details.rb +2 -2
  102. data/lib/oci/core/models/vcn.rb +2 -2
  103. data/lib/oci/core/models/virtual_circuit.rb +5 -5
  104. data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +2 -2
  105. data/lib/oci/core/models/vnic.rb +2 -2
  106. data/lib/oci/core/models/vnic_attachment.rb +2 -2
  107. data/lib/oci/core/models/volume.rb +29 -5
  108. data/lib/oci/core/models/volume_attachment.rb +2 -2
  109. data/lib/oci/core/models/volume_backup.rb +2 -2
  110. data/lib/oci/core/models/volume_source_details.rb +131 -0
  111. data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +128 -0
  112. data/lib/oci/core/models/volume_source_from_volume_details.rb +128 -0
  113. data/lib/oci/core/virtual_network_client.rb +312 -10
  114. data/lib/oci/database/database.rb +7 -0
  115. data/lib/oci/database/database_client.rb +228 -4
  116. data/lib/oci/database/models/backup.rb +253 -0
  117. data/lib/oci/database/models/backup_summary.rb +253 -0
  118. data/lib/oci/database/models/create_backup_details.rb +131 -0
  119. data/lib/oci/database/models/create_data_guard_association_details.rb +2 -2
  120. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +2 -2
  121. data/lib/oci/database/models/create_database_details.rb +13 -3
  122. data/lib/oci/database/models/create_db_home_details.rb +2 -2
  123. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +2 -2
  124. data/lib/oci/database/models/data_guard_association.rb +2 -2
  125. data/lib/oci/database/models/data_guard_association_summary.rb +374 -0
  126. data/lib/oci/database/models/database.rb +15 -3
  127. data/lib/oci/database/models/database_summary.rb +15 -3
  128. data/lib/oci/database/models/db_backup_config.rb +120 -0
  129. data/lib/oci/database/models/db_home.rb +2 -2
  130. data/lib/oci/database/models/db_home_summary.rb +2 -2
  131. data/lib/oci/database/models/db_node.rb +2 -2
  132. data/lib/oci/database/models/db_node_summary.rb +2 -2
  133. data/lib/oci/database/models/db_system.rb +9 -9
  134. data/lib/oci/database/models/db_system_shape_summary.rb +2 -2
  135. data/lib/oci/database/models/db_system_summary.rb +9 -9
  136. data/lib/oci/database/models/db_version_summary.rb +2 -2
  137. data/lib/oci/database/models/failover_data_guard_association_details.rb +2 -2
  138. data/lib/oci/database/models/launch_db_system_details.rb +2 -2
  139. data/lib/oci/database/models/patch.rb +4 -2
  140. data/lib/oci/database/models/patch_details.rb +4 -3
  141. data/lib/oci/database/models/patch_history_entry.rb +3 -2
  142. data/lib/oci/database/models/patch_history_entry_summary.rb +3 -2
  143. data/lib/oci/database/models/patch_summary.rb +4 -2
  144. data/lib/oci/database/models/reinstate_data_guard_association_details.rb +2 -2
  145. data/lib/oci/database/models/restore_database_details.rb +145 -0
  146. data/lib/oci/database/models/switchover_data_guard_association_details.rb +2 -2
  147. data/lib/oci/database/models/update_database_details.rb +119 -0
  148. data/lib/oci/database/models/update_db_home_details.rb +2 -2
  149. data/lib/oci/database/models/update_db_system_details.rb +9 -9
  150. data/lib/oci/identity/identity_client.rb +6 -5
  151. data/lib/oci/identity/models/add_user_to_group_details.rb +2 -2
  152. data/lib/oci/identity/models/api_key.rb +2 -2
  153. data/lib/oci/identity/models/availability_domain.rb +2 -2
  154. data/lib/oci/identity/models/compartment.rb +3 -3
  155. data/lib/oci/identity/models/create_api_key_details.rb +2 -2
  156. data/lib/oci/identity/models/create_compartment_details.rb +2 -2
  157. data/lib/oci/identity/models/create_customer_secret_key_details.rb +2 -2
  158. data/lib/oci/identity/models/create_group_details.rb +2 -2
  159. data/lib/oci/identity/models/create_identity_provider_details.rb +2 -2
  160. data/lib/oci/identity/models/create_idp_group_mapping_details.rb +2 -2
  161. data/lib/oci/identity/models/create_policy_details.rb +2 -2
  162. data/lib/oci/identity/models/create_region_subscription_details.rb +2 -2
  163. data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +2 -2
  164. data/lib/oci/identity/models/create_swift_password_details.rb +2 -2
  165. data/lib/oci/identity/models/create_user_details.rb +2 -2
  166. data/lib/oci/identity/models/customer_secret_key.rb +2 -2
  167. data/lib/oci/identity/models/customer_secret_key_summary.rb +2 -2
  168. data/lib/oci/identity/models/group.rb +2 -2
  169. data/lib/oci/identity/models/identity_provider.rb +4 -4
  170. data/lib/oci/identity/models/idp_group_mapping.rb +2 -2
  171. data/lib/oci/identity/models/policy.rb +2 -2
  172. data/lib/oci/identity/models/region.rb +4 -4
  173. data/lib/oci/identity/models/region_subscription.rb +4 -4
  174. data/lib/oci/identity/models/saml2_identity_provider.rb +2 -2
  175. data/lib/oci/identity/models/swift_password.rb +2 -2
  176. data/lib/oci/identity/models/tenancy.rb +2 -2
  177. data/lib/oci/identity/models/ui_password.rb +2 -2
  178. data/lib/oci/identity/models/update_compartment_details.rb +2 -2
  179. data/lib/oci/identity/models/update_customer_secret_key_details.rb +2 -2
  180. data/lib/oci/identity/models/update_group_details.rb +2 -2
  181. data/lib/oci/identity/models/update_identity_provider_details.rb +2 -2
  182. data/lib/oci/identity/models/update_idp_group_mapping_details.rb +2 -2
  183. data/lib/oci/identity/models/update_policy_details.rb +2 -2
  184. data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +2 -2
  185. data/lib/oci/identity/models/update_state_details.rb +2 -2
  186. data/lib/oci/identity/models/update_swift_password_details.rb +2 -2
  187. data/lib/oci/identity/models/update_user_details.rb +2 -2
  188. data/lib/oci/identity/models/user.rb +2 -2
  189. data/lib/oci/identity/models/user_group_membership.rb +2 -2
  190. data/lib/oci/load_balancer/load_balancer_client.rb +1 -1
  191. data/lib/oci/load_balancer/models/backend.rb +2 -2
  192. data/lib/oci/load_balancer/models/backend_details.rb +2 -2
  193. data/lib/oci/load_balancer/models/backend_health.rb +2 -2
  194. data/lib/oci/load_balancer/models/backend_set.rb +2 -2
  195. data/lib/oci/load_balancer/models/backend_set_details.rb +2 -2
  196. data/lib/oci/load_balancer/models/backend_set_health.rb +2 -2
  197. data/lib/oci/load_balancer/models/certificate.rb +2 -2
  198. data/lib/oci/load_balancer/models/certificate_details.rb +2 -2
  199. data/lib/oci/load_balancer/models/create_backend_details.rb +2 -2
  200. data/lib/oci/load_balancer/models/create_backend_set_details.rb +2 -2
  201. data/lib/oci/load_balancer/models/create_certificate_details.rb +2 -2
  202. data/lib/oci/load_balancer/models/create_listener_details.rb +2 -2
  203. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +2 -2
  204. data/lib/oci/load_balancer/models/health_check_result.rb +2 -2
  205. data/lib/oci/load_balancer/models/health_checker.rb +2 -2
  206. data/lib/oci/load_balancer/models/health_checker_details.rb +2 -2
  207. data/lib/oci/load_balancer/models/ip_address.rb +2 -2
  208. data/lib/oci/load_balancer/models/listener.rb +2 -2
  209. data/lib/oci/load_balancer/models/listener_details.rb +2 -2
  210. data/lib/oci/load_balancer/models/load_balancer.rb +2 -2
  211. data/lib/oci/load_balancer/models/load_balancer_health.rb +2 -2
  212. data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +2 -2
  213. data/lib/oci/load_balancer/models/load_balancer_policy.rb +2 -2
  214. data/lib/oci/load_balancer/models/load_balancer_protocol.rb +2 -2
  215. data/lib/oci/load_balancer/models/load_balancer_shape.rb +2 -2
  216. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +2 -2
  217. data/lib/oci/load_balancer/models/ssl_configuration.rb +2 -2
  218. data/lib/oci/load_balancer/models/ssl_configuration_details.rb +2 -2
  219. data/lib/oci/load_balancer/models/update_backend_details.rb +2 -2
  220. data/lib/oci/load_balancer/models/update_backend_set_details.rb +2 -2
  221. data/lib/oci/load_balancer/models/update_health_checker_details.rb +2 -2
  222. data/lib/oci/load_balancer/models/update_listener_details.rb +2 -2
  223. data/lib/oci/load_balancer/models/update_load_balancer_details.rb +2 -2
  224. data/lib/oci/load_balancer/models/work_request.rb +2 -2
  225. data/lib/oci/load_balancer/models/work_request_error.rb +2 -2
  226. data/lib/oci/object_storage/models/bucket.rb +44 -12
  227. data/lib/oci/object_storage/models/bucket_summary.rb +6 -4
  228. data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +2 -2
  229. data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +2 -2
  230. data/lib/oci/object_storage/models/create_bucket_details.rb +41 -11
  231. data/lib/oci/object_storage/models/create_multipart_upload_details.rb +9 -7
  232. data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +6 -7
  233. data/lib/oci/object_storage/models/list_objects.rb +4 -3
  234. data/lib/oci/object_storage/models/multipart_upload.rb +3 -3
  235. data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +6 -6
  236. data/lib/oci/object_storage/models/namespace_metadata.rb +142 -0
  237. data/lib/oci/object_storage/models/object_summary.rb +6 -4
  238. data/lib/oci/object_storage/models/preauthenticated_request.rb +13 -11
  239. data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +8 -10
  240. data/lib/oci/object_storage/models/rename_object_details.rb +164 -0
  241. data/lib/oci/object_storage/models/restore_objects_details.rb +120 -0
  242. data/lib/oci/object_storage/models/update_bucket_details.rb +20 -8
  243. data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +131 -0
  244. data/lib/oci/object_storage/object_storage.rb +4 -0
  245. data/lib/oci/object_storage/object_storage_client.rb +206 -94
  246. data/lib/oci/regions.rb +2 -1
  247. data/lib/oci/version.rb +1 -1
  248. metadata +22 -2
@@ -0,0 +1,120 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Audit::Models::Configuration
7
+ # The retention period days
8
+ # @return [Integer]
9
+ attr_accessor :retention_period_days
10
+
11
+
12
+ # Initializes the object
13
+ # @param [Hash] attributes Model attributes in the form of hash
14
+ def initialize(attributes = {})
15
+ return unless attributes.is_a?(Hash)
16
+
17
+ # convert string to symbol for hash key
18
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
19
+
20
+ if attributes[:'retentionPeriodDays']
21
+ self.retention_period_days = attributes[:'retentionPeriodDays']
22
+ end
23
+
24
+ end
25
+
26
+ # Checks equality by comparing each attribute.
27
+ # @param [Object] other_object to be compared
28
+ def ==(other_object)
29
+ return true if self.equal?(other_object)
30
+ self.class == other_object.class &&
31
+ retention_period_days == other_object.retention_period_days
32
+ end
33
+
34
+ # @see the `==` method
35
+ # @param [Object] other_object to be compared
36
+ def eql?(other_object)
37
+ self == other_object
38
+ end
39
+
40
+ # Calculates hash code according to all attributes.
41
+ # @return [Fixnum] Hash code
42
+ def hash
43
+ [retention_period_days].hash
44
+ end
45
+
46
+ # Builds the object from hash
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ # @return [Object] Returns the model itself
49
+ def build_from_hash(attributes)
50
+ return nil unless attributes.is_a?(Hash)
51
+ self.class.swagger_types.each_pair do |key, type|
52
+ if type =~ /^Array<(.*)>/i
53
+ # check to ensure the input is an array given that the the attribute
54
+ # is documented as an array but the input is not
55
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
56
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
57
+ end
58
+ elsif !attributes[self.class.attribute_map[key]].nil?
59
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
60
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
61
+ end
62
+
63
+ self
64
+ end
65
+
66
+ # Returns the string representation of the object
67
+ # @return [String] String presentation of the object
68
+ def to_s
69
+ to_hash.to_s
70
+ end
71
+
72
+ # Returns the object in the form of hash
73
+ # @return [Hash] Returns the object in the form of hash
74
+ def to_hash
75
+ hash = {}
76
+ self.class.attribute_map.each_pair do |attr, param|
77
+ value = send(attr)
78
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
79
+ hash[param] = _to_hash(value)
80
+ end
81
+ hash
82
+ end
83
+
84
+ private
85
+
86
+ # Outputs non-array value in the form of hash
87
+ # For object, use to_hash. Otherwise, just return the value
88
+ # @param [Object] value Any valid value
89
+ # @return [Hash] Returns the value in the form of hash
90
+ def _to_hash(value)
91
+ if value.is_a?(Array)
92
+ value.compact.map{ |v| _to_hash(v) }
93
+ elsif value.is_a?(Hash)
94
+ {}.tap do |hash|
95
+ value.each { |k, v| hash[k] = _to_hash(v) }
96
+ end
97
+ elsif value.respond_to? :to_hash
98
+ value.to_hash
99
+ else
100
+ value
101
+ end
102
+ end
103
+
104
+
105
+
106
+ # Attribute mapping from ruby-style variable name to JSON key.
107
+ def self.attribute_map
108
+ {
109
+ :'retention_period_days' => :'retentionPeriodDays'
110
+ }
111
+ end
112
+
113
+ # Attribute type mapping.
114
+ def self.swagger_types
115
+ {
116
+ :'retention_period_days' => :'Integer'
117
+ }
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,120 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Audit::Models::UpdateConfigurationDetails
7
+ # The retention period days
8
+ # @return [Integer]
9
+ attr_accessor :retention_period_days
10
+
11
+
12
+ # Initializes the object
13
+ # @param [Hash] attributes Model attributes in the form of hash
14
+ def initialize(attributes = {})
15
+ return unless attributes.is_a?(Hash)
16
+
17
+ # convert string to symbol for hash key
18
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
19
+
20
+ if attributes[:'retentionPeriodDays']
21
+ self.retention_period_days = attributes[:'retentionPeriodDays']
22
+ end
23
+
24
+ end
25
+
26
+ # Checks equality by comparing each attribute.
27
+ # @param [Object] other_object to be compared
28
+ def ==(other_object)
29
+ return true if self.equal?(other_object)
30
+ self.class == other_object.class &&
31
+ retention_period_days == other_object.retention_period_days
32
+ end
33
+
34
+ # @see the `==` method
35
+ # @param [Object] other_object to be compared
36
+ def eql?(other_object)
37
+ self == other_object
38
+ end
39
+
40
+ # Calculates hash code according to all attributes.
41
+ # @return [Fixnum] Hash code
42
+ def hash
43
+ [retention_period_days].hash
44
+ end
45
+
46
+ # Builds the object from hash
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ # @return [Object] Returns the model itself
49
+ def build_from_hash(attributes)
50
+ return nil unless attributes.is_a?(Hash)
51
+ self.class.swagger_types.each_pair do |key, type|
52
+ if type =~ /^Array<(.*)>/i
53
+ # check to ensure the input is an array given that the the attribute
54
+ # is documented as an array but the input is not
55
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
56
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
57
+ end
58
+ elsif !attributes[self.class.attribute_map[key]].nil?
59
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
60
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
61
+ end
62
+
63
+ self
64
+ end
65
+
66
+ # Returns the string representation of the object
67
+ # @return [String] String presentation of the object
68
+ def to_s
69
+ to_hash.to_s
70
+ end
71
+
72
+ # Returns the object in the form of hash
73
+ # @return [Hash] Returns the object in the form of hash
74
+ def to_hash
75
+ hash = {}
76
+ self.class.attribute_map.each_pair do |attr, param|
77
+ value = send(attr)
78
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
79
+ hash[param] = _to_hash(value)
80
+ end
81
+ hash
82
+ end
83
+
84
+ private
85
+
86
+ # Outputs non-array value in the form of hash
87
+ # For object, use to_hash. Otherwise, just return the value
88
+ # @param [Object] value Any valid value
89
+ # @return [Hash] Returns the value in the form of hash
90
+ def _to_hash(value)
91
+ if value.is_a?(Array)
92
+ value.compact.map{ |v| _to_hash(v) }
93
+ elsif value.is_a?(Hash)
94
+ {}.tap do |hash|
95
+ value.each { |k, v| hash[k] = _to_hash(v) }
96
+ end
97
+ elsif value.respond_to? :to_hash
98
+ value.to_hash
99
+ else
100
+ value
101
+ end
102
+ end
103
+
104
+
105
+
106
+ # Attribute mapping from ruby-style variable name to JSON key.
107
+ def self.attribute_map
108
+ {
109
+ :'retention_period_days' => :'retentionPeriodDays'
110
+ }
111
+ end
112
+
113
+ # Attribute type mapping.
114
+ def self.swagger_types
115
+ {
116
+ :'retention_period_days' => :'Integer'
117
+ }
118
+ end
119
+ end
120
+ end
@@ -0,0 +1 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
@@ -33,7 +33,7 @@ module OCI
33
33
  config ||= OCI.config
34
34
  config.validate
35
35
 
36
- signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content)
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::STANDARD)
37
37
  @api_client = ApiClient.new(config, signer)
38
38
 
39
39
  region ||= config.region
@@ -301,12 +301,42 @@ module OCI
301
301
  #
302
302
  # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
303
303
  #
304
+ # @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
305
+ #
306
+ # @option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for
307
+ # TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
308
+ # sort order is case sensitive.
309
+ #
310
+ # **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
311
+ # optionally filter by Availability Domain if the scope of the resource type is within a
312
+ # single Availability Domain. If you call one of these \"List\" operations without specifying
313
+ # an Availability Domain, the resources are grouped by Availability Domain, then sorted.
314
+ #
315
+ # Allowed values are: TIMECREATED, DISPLAYNAME
316
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
317
+ # is case sensitive.
318
+ #
319
+ # Allowed values are: ASC, DESC
320
+ # @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
321
+ #
304
322
  # @return [Response] A Response object with data of type Array<OCI::Core::Models::VolumeBackup>
305
323
  def list_volume_backups(compartment_id, opts = {})
306
324
  logger.debug "Calling operation BlockstorageClient#list_volume_backups." if logger
307
325
 
308
326
  fail "Missing the required parameter 'compartment_id' when calling list_volume_backups." if compartment_id.nil?
309
327
 
328
+ if opts[:'sort_by'] && !['TIMECREATED', 'DISPLAYNAME'].include?(opts[:'sort_by'])
329
+ fail 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
330
+ end
331
+
332
+ if opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
333
+ fail 'Invalid value for "sort_order", must be one of ASC, DESC.'
334
+ end
335
+
336
+ if opts[:'lifecycle_state'] && !OCI::Core::Models::VolumeBackup::LIFECYCLE_STATE_ENUM.include?(opts[:'lifecycle_state'])
337
+ fail 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::VolumeBackup::LIFECYCLE_STATE_ENUM.'
338
+ end
339
+
310
340
  path = "/volumeBackups"
311
341
 
312
342
  # Query Params
@@ -315,6 +345,10 @@ module OCI
315
345
  query_params[:'volumeId'] = opts[:'volume_id'] if opts[:'volume_id']
316
346
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
317
347
  query_params[:'page'] = opts[:'page'] if opts[:'page']
348
+ query_params[:'displayName'] = opts[:'display_name'] if opts[:'display_name']
349
+ query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
350
+ query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
351
+ query_params[:'lifecycleState'] = opts[:'lifecycle_state'] if opts[:'lifecycle_state']
318
352
 
319
353
  # Header Params
320
354
  header_params = {}
@@ -347,12 +381,42 @@ module OCI
347
381
  #
348
382
  # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
349
383
  #
384
+ # @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
385
+ #
386
+ # @option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for
387
+ # TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
388
+ # sort order is case sensitive.
389
+ #
390
+ # **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
391
+ # optionally filter by Availability Domain if the scope of the resource type is within a
392
+ # single Availability Domain. If you call one of these \"List\" operations without specifying
393
+ # an Availability Domain, the resources are grouped by Availability Domain, then sorted.
394
+ #
395
+ # Allowed values are: TIMECREATED, DISPLAYNAME
396
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
397
+ # is case sensitive.
398
+ #
399
+ # Allowed values are: ASC, DESC
400
+ # @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
401
+ #
350
402
  # @return [Response] A Response object with data of type Array<OCI::Core::Models::Volume>
351
403
  def list_volumes(compartment_id, opts = {})
352
404
  logger.debug "Calling operation BlockstorageClient#list_volumes." if logger
353
405
 
354
406
  fail "Missing the required parameter 'compartment_id' when calling list_volumes." if compartment_id.nil?
355
407
 
408
+ if opts[:'sort_by'] && !['TIMECREATED', 'DISPLAYNAME'].include?(opts[:'sort_by'])
409
+ fail 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
410
+ end
411
+
412
+ if opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
413
+ fail 'Invalid value for "sort_order", must be one of ASC, DESC.'
414
+ end
415
+
416
+ if opts[:'lifecycle_state'] && !OCI::Core::Models::Volume::LIFECYCLE_STATE_ENUM.include?(opts[:'lifecycle_state'])
417
+ fail 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::Volume::LIFECYCLE_STATE_ENUM.'
418
+ end
419
+
356
420
  path = "/volumes"
357
421
 
358
422
  # Query Params
@@ -361,6 +425,10 @@ module OCI
361
425
  query_params[:'availabilityDomain'] = opts[:'availability_domain'] if opts[:'availability_domain']
362
426
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
363
427
  query_params[:'page'] = opts[:'page'] if opts[:'page']
428
+ query_params[:'displayName'] = opts[:'display_name'] if opts[:'display_name']
429
+ query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
430
+ query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
431
+ query_params[:'lifecycleState'] = opts[:'lifecycle_state'] if opts[:'lifecycle_state']
364
432
 
365
433
  # Header Params
366
434
  header_params = {}
@@ -33,7 +33,7 @@ module OCI
33
33
  config ||= OCI.config
34
34
  config.validate
35
35
 
36
- signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content)
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::STANDARD)
37
37
  @api_client = ApiClient.new(config, signer)
38
38
 
39
39
  region ||= config.region
@@ -193,19 +193,19 @@ module OCI
193
193
  :return_type => 'OCI::Core::Models::ConsoleHistory')
194
194
  end
195
195
 
196
- # Creates a boot disk image for the specified instance or imports an exported image from the Oracle Bare Metal Cloud Object Storage Service.
196
+ # Creates a boot disk image for the specified instance or imports an exported image from the Oracle Cloud Infrastructure Object Storage service.
197
197
  #
198
198
  # When creating a new image, you must provide the OCID of the instance you want to use as the basis for the image, and
199
199
  # the OCID of the compartment containing that instance. For more information about images,
200
200
  # see [Managing Custom Images](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm).
201
201
  #
202
- # When importing an exported image from the Object Storage Service, you specify the source information
202
+ # When importing an exported image from Object Storage, you specify the source information
203
203
  # in {#image_source_details image_source_details}.
204
204
  #
205
205
  # When importing an image based on the namespace, bucket name, and object name,
206
206
  # use {#image_source_via_object_storage_tuple_details image_source_via_object_storage_tuple_details}.
207
207
  #
208
- # When importing an image based on the Object Storage Service URL, use
208
+ # When importing an image based on the Object Storage URL, use
209
209
  # image_source_via_object_storage_uri_details.
210
210
  # See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth)
211
211
  # for constructing URLs for image import/export.
@@ -488,12 +488,12 @@ module OCI
488
488
  :body => post_body)
489
489
  end
490
490
 
491
- # Exports the specified image to the Oracle Bare Metal Cloud Object Storage Service. You can use the Object Storage Service URL,
491
+ # Exports the specified image to the Oracle Cloud Infrastructure Object Storage service. You can use the Object Storage URL,
492
492
  # or the namespace, bucket name, and object name when specifying the location to export to.
493
493
  #
494
494
  # For more information about exporting images, see [Image Import/Export](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm).
495
495
  #
496
- # To perform an image export, you need write access to the Object Storage Service bucket for the image,
496
+ # To perform an image export, you need write access to the Object Storage bucket for the image,
497
497
  # see [Let Users Write Objects to Object Storage Buckets](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/commonpolicies.htm#Let4).
498
498
  #
499
499
  # See [Object Storage URLs](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/imageimportexport.htm#URLs) and [pre-authenticated requests](https://docs.us-phoenix-1.oraclecloud.com/Content/Object/Tasks/managingaccess.htm#pre-auth)
@@ -823,6 +823,7 @@ module OCI
823
823
  #
824
824
  # @param [String] instance_id The OCID of the instance.
825
825
  # @param [String] action The action to perform on the instance.
826
+ # Allowed values are: STOP, START, SOFTRESET, RESET
826
827
  # @param [Hash] opts the optional parameters
827
828
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
828
829
  # server error without risk of executing that same action again. Retry tokens expire after 24
@@ -881,7 +882,7 @@ module OCI
881
882
  # To get a list of Availability Domains, use the `ListAvailabilityDomains` operation
882
883
  # in the Identity and Access Management Service API.
883
884
  #
884
- # All Oracle Bare Metal Cloud Services resources, including instances, get an Oracle-assigned,
885
+ # All Oracle Cloud Infrastructure resources, including instances, get an Oracle-assigned,
885
886
  # unique ID called an Oracle Cloud Identifier (OCID).
886
887
  # When you create a resource, you can find its OCID in the response. You can
887
888
  # also retrieve a resource's OCID by using a List API operation
@@ -951,12 +952,40 @@ module OCI
951
952
  # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
952
953
  #
953
954
  # @option opts [String] :instance_id The OCID of the instance.
955
+ # @option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for
956
+ # TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
957
+ # sort order is case sensitive.
958
+ #
959
+ # **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
960
+ # optionally filter by Availability Domain if the scope of the resource type is within a
961
+ # single Availability Domain. If you call one of these \"List\" operations without specifying
962
+ # an Availability Domain, the resources are grouped by Availability Domain, then sorted.
963
+ #
964
+ # Allowed values are: TIMECREATED, DISPLAYNAME
965
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
966
+ # is case sensitive.
967
+ #
968
+ # Allowed values are: ASC, DESC
969
+ # @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
970
+ #
954
971
  # @return [Response] A Response object with data of type Array<OCI::Core::Models::ConsoleHistory>
955
972
  def list_console_histories(compartment_id, opts = {})
956
973
  logger.debug "Calling operation ComputeClient#list_console_histories." if logger
957
974
 
958
975
  fail "Missing the required parameter 'compartment_id' when calling list_console_histories." if compartment_id.nil?
959
976
 
977
+ if opts[:'sort_by'] && !['TIMECREATED', 'DISPLAYNAME'].include?(opts[:'sort_by'])
978
+ fail 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
979
+ end
980
+
981
+ if opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
982
+ fail 'Invalid value for "sort_order", must be one of ASC, DESC.'
983
+ end
984
+
985
+ if opts[:'lifecycle_state'] && !OCI::Core::Models::ConsoleHistory::LIFECYCLE_STATE_ENUM.include?(opts[:'lifecycle_state'])
986
+ fail 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::ConsoleHistory::LIFECYCLE_STATE_ENUM.'
987
+ end
988
+
960
989
  path = "/instanceConsoleHistories/"
961
990
 
962
991
  # Query Params
@@ -966,6 +995,9 @@ module OCI
966
995
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
967
996
  query_params[:'page'] = opts[:'page'] if opts[:'page']
968
997
  query_params[:'instanceId'] = opts[:'instance_id'] if opts[:'instance_id']
998
+ query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
999
+ query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
1000
+ query_params[:'lifecycleState'] = opts[:'lifecycle_state'] if opts[:'lifecycle_state']
969
1001
 
970
1002
  # Header Params
971
1003
  header_params = {}
@@ -984,16 +1016,15 @@ module OCI
984
1016
  :return_type => 'Array<OCI::Core::Models::ConsoleHistory>')
985
1017
  end
986
1018
 
987
- # Lists the available images in the specified compartment. For more
1019
+ # Lists the available images in the specified compartment.
1020
+ # If you specify a value for the `sortBy` parameter, Oracle-provided images appear first in the list, followed by custom images.
1021
+ # For more
988
1022
  # information about images, see
989
1023
  # [Managing Custom Images](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm).
990
1024
  #
991
1025
  # @param [String] compartment_id The OCID of the compartment.
992
1026
  # @param [Hash] opts the optional parameters
993
- # @option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.
994
- # Avoid entering confidential information.
995
- #
996
- # Example: `My new resource`
1027
+ # @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
997
1028
  #
998
1029
  # @option opts [String] :operating_system The image's operating system.
999
1030
  #
@@ -1009,12 +1040,40 @@ module OCI
1009
1040
  #
1010
1041
  # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
1011
1042
  #
1043
+ # @option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for
1044
+ # TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
1045
+ # sort order is case sensitive.
1046
+ #
1047
+ # **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
1048
+ # optionally filter by Availability Domain if the scope of the resource type is within a
1049
+ # single Availability Domain. If you call one of these \"List\" operations without specifying
1050
+ # an Availability Domain, the resources are grouped by Availability Domain, then sorted.
1051
+ #
1052
+ # Allowed values are: TIMECREATED, DISPLAYNAME
1053
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
1054
+ # is case sensitive.
1055
+ #
1056
+ # Allowed values are: ASC, DESC
1057
+ # @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
1058
+ #
1012
1059
  # @return [Response] A Response object with data of type Array<OCI::Core::Models::Image>
1013
1060
  def list_images(compartment_id, opts = {})
1014
1061
  logger.debug "Calling operation ComputeClient#list_images." if logger
1015
1062
 
1016
1063
  fail "Missing the required parameter 'compartment_id' when calling list_images." if compartment_id.nil?
1017
1064
 
1065
+ if opts[:'sort_by'] && !['TIMECREATED', 'DISPLAYNAME'].include?(opts[:'sort_by'])
1066
+ fail 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
1067
+ end
1068
+
1069
+ if opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
1070
+ fail 'Invalid value for "sort_order", must be one of ASC, DESC.'
1071
+ end
1072
+
1073
+ if opts[:'lifecycle_state'] && !OCI::Core::Models::Image::LIFECYCLE_STATE_ENUM.include?(opts[:'lifecycle_state'])
1074
+ fail 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::Image::LIFECYCLE_STATE_ENUM.'
1075
+ end
1076
+
1018
1077
  path = "/images/"
1019
1078
 
1020
1079
  # Query Params
@@ -1025,6 +1084,9 @@ module OCI
1025
1084
  query_params[:'operatingSystemVersion'] = opts[:'operating_system_version'] if opts[:'operating_system_version']
1026
1085
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
1027
1086
  query_params[:'page'] = opts[:'page'] if opts[:'page']
1087
+ query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
1088
+ query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
1089
+ query_params[:'lifecycleState'] = opts[:'lifecycle_state'] if opts[:'lifecycle_state']
1028
1090
 
1029
1091
  # Header Params
1030
1092
  header_params = {}
@@ -1098,10 +1160,7 @@ module OCI
1098
1160
  #
1099
1161
  # Example: `Uocm:PHX-AD-1`
1100
1162
  #
1101
- # @option opts [String] :display_name A user-friendly name. Does not have to be unique, and it's changeable.
1102
- # Avoid entering confidential information.
1103
- #
1104
- # Example: `My new resource`
1163
+ # @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
1105
1164
  #
1106
1165
  # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1107
1166
  #
@@ -1109,12 +1168,40 @@ module OCI
1109
1168
  #
1110
1169
  # @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
1111
1170
  #
1171
+ # @option opts [String] :sort_by The field to sort by. You can provide one sort order (`sortOrder`). Default order for
1172
+ # TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
1173
+ # sort order is case sensitive.
1174
+ #
1175
+ # **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
1176
+ # optionally filter by Availability Domain if the scope of the resource type is within a
1177
+ # single Availability Domain. If you call one of these \"List\" operations without specifying
1178
+ # an Availability Domain, the resources are grouped by Availability Domain, then sorted.
1179
+ #
1180
+ # Allowed values are: TIMECREATED, DISPLAYNAME
1181
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
1182
+ # is case sensitive.
1183
+ #
1184
+ # Allowed values are: ASC, DESC
1185
+ # @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
1186
+ #
1112
1187
  # @return [Response] A Response object with data of type Array<OCI::Core::Models::Instance>
1113
1188
  def list_instances(compartment_id, opts = {})
1114
1189
  logger.debug "Calling operation ComputeClient#list_instances." if logger
1115
1190
 
1116
1191
  fail "Missing the required parameter 'compartment_id' when calling list_instances." if compartment_id.nil?
1117
1192
 
1193
+ if opts[:'sort_by'] && !['TIMECREATED', 'DISPLAYNAME'].include?(opts[:'sort_by'])
1194
+ fail 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
1195
+ end
1196
+
1197
+ if opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
1198
+ fail 'Invalid value for "sort_order", must be one of ASC, DESC.'
1199
+ end
1200
+
1201
+ if opts[:'lifecycle_state'] && !OCI::Core::Models::Instance::LIFECYCLE_STATE_ENUM.include?(opts[:'lifecycle_state'])
1202
+ fail 'Invalid value for "lifecycle_state", must be one of the values in OCI::Core::Models::Instance::LIFECYCLE_STATE_ENUM.'
1203
+ end
1204
+
1118
1205
  path = "/instances/"
1119
1206
 
1120
1207
  # Query Params
@@ -1124,6 +1211,9 @@ module OCI
1124
1211
  query_params[:'displayName'] = opts[:'display_name'] if opts[:'display_name']
1125
1212
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
1126
1213
  query_params[:'page'] = opts[:'page'] if opts[:'page']
1214
+ query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
1215
+ query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
1216
+ query_params[:'lifecycleState'] = opts[:'lifecycle_state'] if opts[:'lifecycle_state']
1127
1217
 
1128
1218
  # Header Params
1129
1219
  header_params = {}