oci 2.5.9 → 2.5.10

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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/oci/autoscaling/auto_scaling_client.rb +73 -0
  4. data/lib/oci/autoscaling/autoscaling.rb +1 -0
  5. data/lib/oci/autoscaling/models/change_auto_scaling_compartment_details.rb +154 -0
  6. data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +0 -1
  7. data/lib/oci/container_engine/models/work_request_error.rb +0 -1
  8. data/lib/oci/core/blockstorage_client.rb +342 -0
  9. data/lib/oci/core/compute_client.rb +77 -5
  10. data/lib/oci/core/compute_client_composite_operations.rb +3 -3
  11. data/lib/oci/core/compute_management_client.rb +211 -0
  12. data/lib/oci/core/core.rb +27 -0
  13. data/lib/oci/core/models/add_network_security_group_security_rules_details.rb +153 -0
  14. data/lib/oci/core/models/add_security_rule_details.rb +388 -0
  15. data/lib/oci/core/models/added_network_security_group_security_rules.rb +153 -0
  16. data/lib/oci/core/models/change_boot_volume_backup_compartment_details.rb +153 -0
  17. data/lib/oci/core/models/change_boot_volume_compartment_details.rb +153 -0
  18. data/lib/oci/core/models/change_image_compartment_details.rb +154 -0
  19. data/lib/oci/core/models/change_instance_configuration_compartment_details.rb +155 -0
  20. data/lib/oci/core/models/change_instance_pool_compartment_details.rb +155 -0
  21. data/lib/oci/core/models/change_nat_gateway_compartment_details.rb +153 -0
  22. data/lib/oci/core/models/change_route_table_compartment_details.rb +155 -0
  23. data/lib/oci/core/models/change_security_list_compartment_details.rb +155 -0
  24. data/lib/oci/core/models/change_service_gateway_compartment_details.rb +155 -0
  25. data/lib/oci/core/models/change_subnet_compartment_details.rb +155 -0
  26. data/lib/oci/core/models/change_vcn_compartment_details.rb +155 -0
  27. data/lib/oci/core/models/change_volume_backup_compartment_details.rb +153 -0
  28. data/lib/oci/core/models/change_volume_compartment_details.rb +153 -0
  29. data/lib/oci/core/models/change_volume_group_backup_compartment_details.rb +153 -0
  30. data/lib/oci/core/models/change_volume_group_compartment_details.rb +153 -0
  31. data/lib/oci/core/models/create_network_security_group_details.rb +223 -0
  32. data/lib/oci/core/models/create_vnic_details.rb +18 -1
  33. data/lib/oci/core/models/image.rb +2 -1
  34. data/lib/oci/core/models/instance_configuration.rb +3 -1
  35. data/lib/oci/core/models/instance_configuration_create_vnic_details.rb +18 -1
  36. data/lib/oci/core/models/instance_configuration_instance_source_via_image_details.rb +15 -1
  37. data/lib/oci/core/models/instance_configuration_summary.rb +3 -3
  38. data/lib/oci/core/models/instance_pool.rb +4 -1
  39. data/lib/oci/core/models/instance_pool_summary.rb +3 -3
  40. data/lib/oci/core/models/network_security_group.rb +324 -0
  41. data/lib/oci/core/models/network_security_group_vnic.rb +188 -0
  42. data/lib/oci/core/models/remove_network_security_group_security_rules_details.rb +154 -0
  43. data/lib/oci/core/models/security_list.rb +5 -0
  44. data/lib/oci/core/models/security_rule.rb +455 -0
  45. data/lib/oci/core/models/update_network_security_group_details.rb +189 -0
  46. data/lib/oci/core/models/update_network_security_group_security_rules_details.rb +153 -0
  47. data/lib/oci/core/models/update_security_rule_details.rb +404 -0
  48. data/lib/oci/core/models/update_vnic_details.rb +20 -1
  49. data/lib/oci/core/models/updated_network_security_group_security_rules.rb +153 -0
  50. data/lib/oci/core/models/vnic.rb +18 -1
  51. data/lib/oci/core/virtual_network_client.rb +1228 -132
  52. data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
  53. data/lib/oci/database/database.rb +19 -0
  54. data/lib/oci/database/database_client.rb +1066 -46
  55. data/lib/oci/database/database_client_composite_operations.rb +317 -0
  56. data/lib/oci/database/models/autonomous_container_database.rb +416 -0
  57. data/lib/oci/database/models/autonomous_container_database_backup_config.rb +157 -0
  58. data/lib/oci/database/models/autonomous_container_database_summary.rb +420 -0
  59. data/lib/oci/database/models/autonomous_database.rb +58 -1
  60. data/lib/oci/database/models/autonomous_database_backup.rb +16 -1
  61. data/lib/oci/database/models/autonomous_database_backup_summary.rb +16 -1
  62. data/lib/oci/database/models/autonomous_database_connection_strings.rb +11 -1
  63. data/lib/oci/database/models/autonomous_database_connection_urls.rb +170 -0
  64. data/lib/oci/database/models/autonomous_database_summary.rb +58 -1
  65. data/lib/oci/database/models/autonomous_db_preview_version_summary.rb +224 -0
  66. data/lib/oci/database/models/autonomous_exadata_infrastructure.rb +419 -0
  67. data/lib/oci/database/models/autonomous_exadata_infrastructure_maintenance_window.rb +186 -0
  68. data/lib/oci/database/models/autonomous_exadata_infrastructure_shape_summary.rb +224 -0
  69. data/lib/oci/database/models/autonomous_exadata_infrastructure_summary.rb +436 -0
  70. data/lib/oci/database/models/backup.rb +1 -0
  71. data/lib/oci/database/models/backup_summary.rb +1 -0
  72. data/lib/oci/database/models/create_autonomous_container_database_details.rb +284 -0
  73. data/lib/oci/database/models/create_autonomous_database_base.rb +46 -1
  74. data/lib/oci/database/models/create_autonomous_database_clone_details.rb +13 -1
  75. data/lib/oci/database/models/create_autonomous_database_details.rb +13 -1
  76. data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +34 -1
  77. data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +1 -1
  78. data/lib/oci/database/models/day_of_week.rb +174 -0
  79. data/lib/oci/database/models/db_system.rb +34 -1
  80. data/lib/oci/database/models/db_system_summary.rb +34 -1
  81. data/lib/oci/database/models/launch_autonomous_exadata_infrastructure_details.rb +304 -0
  82. data/lib/oci/database/models/launch_db_system_base.rb +35 -2
  83. data/lib/oci/database/models/launch_db_system_details.rb +11 -2
  84. data/lib/oci/database/models/launch_db_system_from_backup_details.rb +11 -2
  85. data/lib/oci/database/models/maintenance_run.rb +392 -0
  86. data/lib/oci/database/models/maintenance_run_summary.rb +395 -0
  87. data/lib/oci/database/models/maintenance_window.rb +226 -0
  88. data/lib/oci/database/models/month.rb +179 -0
  89. data/lib/oci/database/models/restore_autonomous_database_details.rb +30 -4
  90. data/lib/oci/database/models/update_autonomous_container_database_details.rb +230 -0
  91. data/lib/oci/database/models/update_autonomous_database_details.rb +18 -1
  92. data/lib/oci/database/models/update_autonomous_exadata_infrastructure_details.rb +203 -0
  93. data/lib/oci/database/models/update_db_system_details.rb +37 -4
  94. data/lib/oci/database/models/update_maintenance_run_details.rb +154 -0
  95. data/lib/oci/email/email.rb +1 -0
  96. data/lib/oci/email/email_client.rb +62 -0
  97. data/lib/oci/email/models/change_sender_compartment_details.rb +157 -0
  98. data/lib/oci/key_management/key_management.rb +1 -0
  99. data/lib/oci/key_management/kms_crypto_client.rb +4 -4
  100. data/lib/oci/key_management/kms_management_client.rb +161 -10
  101. data/lib/oci/key_management/kms_management_client_composite_operations.rb +79 -0
  102. data/lib/oci/key_management/kms_vault_client.rb +16 -11
  103. data/lib/oci/key_management/models/key.rb +17 -1
  104. data/lib/oci/key_management/models/schedule_key_deletion_details.rb +156 -0
  105. data/lib/oci/load_balancer/load_balancer.rb +1 -0
  106. data/lib/oci/load_balancer/load_balancer_client.rb +64 -0
  107. data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +50 -0
  108. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +16 -1
  109. data/lib/oci/load_balancer/models/load_balancer.rb +16 -1
  110. data/lib/oci/load_balancer/models/remove_http_request_header_rule.rb +1 -1
  111. data/lib/oci/load_balancer/models/remove_http_response_header_rule.rb +1 -1
  112. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +9 -5
  113. data/lib/oci/load_balancer/models/update_backend_set_details.rb +2 -0
  114. data/lib/oci/load_balancer/models/update_network_security_groups_details.rb +154 -0
  115. data/lib/oci/monitoring/models/metric.rb +1 -0
  116. data/lib/oci/object_storage/models/work_request_error.rb +1 -0
  117. data/lib/oci/resource_manager/models/change_stack_compartment_details.rb +155 -0
  118. data/lib/oci/resource_manager/models/work_request.rb +293 -0
  119. data/lib/oci/resource_manager/models/work_request_error.rb +170 -0
  120. data/lib/oci/resource_manager/models/work_request_log_entry.rb +159 -0
  121. data/lib/oci/resource_manager/models/work_request_resource.rb +217 -0
  122. data/lib/oci/resource_manager/models/work_request_summary.rb +254 -0
  123. data/lib/oci/resource_manager/resource_manager.rb +6 -0
  124. data/lib/oci/resource_manager/resource_manager_client.rb +338 -0
  125. data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +50 -0
  126. data/lib/oci/streaming/stream_admin_client.rb +2 -2
  127. data/lib/oci/streaming/stream_client.rb +1 -1
  128. data/lib/oci/version.rb +1 -1
  129. metadata +58 -2
@@ -73,6 +73,12 @@ module OCI
73
73
  # @return [DateTime]
74
74
  attr_accessor :time_created
75
75
 
76
+ # An optional property for the deletion time of the key, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.
77
+ # Example: `2019-04-03T21:10:29.600Z`
78
+ #
79
+ # @return [DateTime]
80
+ attr_accessor :time_of_deletion
81
+
76
82
  # **[Required]** The OCID of the vault that contains this key.
77
83
  # @return [String]
78
84
  attr_accessor :vault_id
@@ -90,6 +96,7 @@ module OCI
90
96
  'key_shape': :'keyShape',
91
97
  'lifecycle_state': :'lifecycleState',
92
98
  'time_created': :'timeCreated',
99
+ 'time_of_deletion': :'timeOfDeletion',
93
100
  'vault_id': :'vaultId'
94
101
  # rubocop:enable Style/SymbolLiteral
95
102
  }
@@ -108,6 +115,7 @@ module OCI
108
115
  'key_shape': :'OCI::KeyManagement::Models::KeyShape',
109
116
  'lifecycle_state': :'String',
110
117
  'time_created': :'DateTime',
118
+ 'time_of_deletion': :'DateTime',
111
119
  'vault_id': :'String'
112
120
  # rubocop:enable Style/SymbolLiteral
113
121
  }
@@ -128,6 +136,7 @@ module OCI
128
136
  # @option attributes [OCI::KeyManagement::Models::KeyShape] :key_shape The value to assign to the {#key_shape} property
129
137
  # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
130
138
  # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
139
+ # @option attributes [DateTime] :time_of_deletion The value to assign to the {#time_of_deletion} property
131
140
  # @option attributes [String] :vault_id The value to assign to the {#vault_id} property
132
141
  def initialize(attributes = {})
133
142
  return unless attributes.is_a?(Hash)
@@ -185,6 +194,12 @@ module OCI
185
194
 
186
195
  self.time_created = attributes[:'time_created'] if attributes[:'time_created']
187
196
 
197
+ self.time_of_deletion = attributes[:'timeOfDeletion'] if attributes[:'timeOfDeletion']
198
+
199
+ raise 'You cannot provide both :timeOfDeletion and :time_of_deletion' if attributes.key?(:'timeOfDeletion') && attributes.key?(:'time_of_deletion')
200
+
201
+ self.time_of_deletion = attributes[:'time_of_deletion'] if attributes[:'time_of_deletion']
202
+
188
203
  self.vault_id = attributes[:'vaultId'] if attributes[:'vaultId']
189
204
 
190
205
  raise 'You cannot provide both :vaultId and :vault_id' if attributes.key?(:'vaultId') && attributes.key?(:'vault_id')
@@ -225,6 +240,7 @@ module OCI
225
240
  key_shape == other.key_shape &&
226
241
  lifecycle_state == other.lifecycle_state &&
227
242
  time_created == other.time_created &&
243
+ time_of_deletion == other.time_of_deletion &&
228
244
  vault_id == other.vault_id
229
245
  end
230
246
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
@@ -241,7 +257,7 @@ module OCI
241
257
  # Calculates hash code according to all attributes.
242
258
  # @return [Fixnum] Hash code
243
259
  def hash
244
- [compartment_id, current_key_version, defined_tags, display_name, freeform_tags, id, key_shape, lifecycle_state, time_created, vault_id].hash
260
+ [compartment_id, current_key_version, defined_tags, display_name, freeform_tags, id, key_shape, lifecycle_state, time_created, time_of_deletion, vault_id].hash
245
261
  end
246
262
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
247
263
 
@@ -0,0 +1,156 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
6
+ module OCI
7
+ # Details for scheduling key deletion
8
+ class KeyManagement::Models::ScheduleKeyDeletionDetails
9
+ # An optional property to indicate the deletion time of the key, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339)
10
+ # timestamp format. The specified time must be between 7 and 30 days from the time
11
+ # when the request is received. If this property is missing, it will be set to 30 days from the time of the request by default.
12
+ #
13
+ # @return [DateTime]
14
+ attr_accessor :time_of_deletion
15
+
16
+ # Attribute mapping from ruby-style variable name to JSON key.
17
+ def self.attribute_map
18
+ {
19
+ # rubocop:disable Style/SymbolLiteral
20
+ 'time_of_deletion': :'timeOfDeletion'
21
+ # rubocop:enable Style/SymbolLiteral
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.swagger_types
27
+ {
28
+ # rubocop:disable Style/SymbolLiteral
29
+ 'time_of_deletion': :'DateTime'
30
+ # rubocop:enable Style/SymbolLiteral
31
+ }
32
+ end
33
+
34
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
35
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
36
+
37
+
38
+ # Initializes the object
39
+ # @param [Hash] attributes Model attributes in the form of hash
40
+ # @option attributes [DateTime] :time_of_deletion The value to assign to the {#time_of_deletion} property
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ self.time_of_deletion = attributes[:'timeOfDeletion'] if attributes[:'timeOfDeletion']
48
+
49
+ raise 'You cannot provide both :timeOfDeletion and :time_of_deletion' if attributes.key?(:'timeOfDeletion') && attributes.key?(:'time_of_deletion')
50
+
51
+ self.time_of_deletion = attributes[:'time_of_deletion'] if attributes[:'time_of_deletion']
52
+ end
53
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
54
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
55
+
56
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
57
+
58
+
59
+ # Checks equality by comparing each attribute.
60
+ # @param [Object] other the other object to be compared
61
+ def ==(other)
62
+ return true if equal?(other)
63
+
64
+ self.class == other.class &&
65
+ time_of_deletion == other.time_of_deletion
66
+ end
67
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
68
+
69
+ # @see the `==` method
70
+ # @param [Object] other the other object to be compared
71
+ def eql?(other)
72
+ self == other
73
+ end
74
+
75
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
76
+
77
+
78
+ # Calculates hash code according to all attributes.
79
+ # @return [Fixnum] Hash code
80
+ def hash
81
+ [time_of_deletion].hash
82
+ end
83
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
84
+
85
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
86
+
87
+
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+
94
+ self.class.swagger_types.each_pair do |key, type|
95
+ if type =~ /^Array<(.*)>/i
96
+ # check to ensure the input is an array given that the the attribute
97
+ # is documented as an array but the input is not
98
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
99
+ public_method("#{key}=").call(
100
+ attributes[self.class.attribute_map[key]]
101
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
102
+ )
103
+ end
104
+ elsif !attributes[self.class.attribute_map[key]].nil?
105
+ public_method("#{key}=").call(
106
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
107
+ )
108
+ end
109
+ # or else data not found in attributes(hash), not an issue as the data can be optional
110
+ end
111
+
112
+ self
113
+ end
114
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
115
+
116
+ # Returns the string representation of the object
117
+ # @return [String] String presentation of the object
118
+ def to_s
119
+ to_hash.to_s
120
+ end
121
+
122
+ # Returns the object in the form of hash
123
+ # @return [Hash] Returns the object in the form of hash
124
+ def to_hash
125
+ hash = {}
126
+ self.class.attribute_map.each_pair do |attr, param|
127
+ value = public_method(attr).call
128
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
129
+
130
+ hash[param] = _to_hash(value)
131
+ end
132
+ hash
133
+ end
134
+
135
+ private
136
+
137
+ # Outputs non-array value in the form of hash
138
+ # For object, use to_hash. Otherwise, just return the value
139
+ # @param [Object] value Any valid value
140
+ # @return [Hash] Returns the value in the form of hash
141
+ def _to_hash(value)
142
+ if value.is_a?(Array)
143
+ value.compact.map { |v| _to_hash(v) }
144
+ elsif value.is_a?(Hash)
145
+ {}.tap do |hash|
146
+ value.each { |k, v| hash[k] = _to_hash(v) }
147
+ end
148
+ elsif value.respond_to? :to_hash
149
+ value.to_hash
150
+ else
151
+ value
152
+ end
153
+ end
154
+ end
155
+ end
156
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -63,6 +63,7 @@ require 'oci/load_balancer/models/update_health_checker_details'
63
63
  require 'oci/load_balancer/models/update_hostname_details'
64
64
  require 'oci/load_balancer/models/update_listener_details'
65
65
  require 'oci/load_balancer/models/update_load_balancer_details'
66
+ require 'oci/load_balancer/models/update_network_security_groups_details'
66
67
  require 'oci/load_balancer/models/update_path_route_set_details'
67
68
  require 'oci/load_balancer/models/update_rule_set_details'
68
69
  require 'oci/load_balancer/models/work_request'
@@ -3004,6 +3004,70 @@ module OCI
3004
3004
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
3005
3005
 
3006
3006
 
3007
+ # Updates the network security groups to be used by a load balancer.
3008
+ # @param [OCI::LoadBalancer::Models::UpdateNetworkSecurityGroupsDetails] update_network_security_groups_details The details for updating the NSGs of the load balancer.
3009
+ # @param [String] load_balancer_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the load balancer on which update the NSGs.
3010
+ # @param [Hash] opts the optional parameters
3011
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
3012
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
3013
+ # @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
3014
+ # particular request, please provide the request ID.
3015
+ # (default to )
3016
+ # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
3017
+ # server error without risk of executing that same action again. Retry tokens expire after 24
3018
+ # hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
3019
+ # has been deleted and purged from the system, then a retry of the original creation request
3020
+ # may be rejected).
3021
+ #
3022
+ # @return [Response] A Response object with data of type nil
3023
+ def update_network_security_groups(update_network_security_groups_details, load_balancer_id, opts = {})
3024
+ logger.debug 'Calling operation LoadBalancerClient#update_network_security_groups.' if logger
3025
+
3026
+ raise "Missing the required parameter 'update_network_security_groups_details' when calling update_network_security_groups." if update_network_security_groups_details.nil?
3027
+ raise "Missing the required parameter 'load_balancer_id' when calling update_network_security_groups." if load_balancer_id.nil?
3028
+ raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util.blank_string?(load_balancer_id)
3029
+
3030
+ path = '/loadBalancers/{loadBalancerId}/networkSecurityGroups'.sub('{loadBalancerId}', load_balancer_id.to_s)
3031
+ operation_signing_strategy = :standard
3032
+
3033
+ # rubocop:disable Style/NegatedIf
3034
+ # Query Params
3035
+ query_params = {}
3036
+
3037
+ # Header Params
3038
+ header_params = {}
3039
+ header_params[:accept] = 'application/json'
3040
+ header_params[:'content-type'] = 'application/json'
3041
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
3042
+ header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
3043
+ # rubocop:enable Style/NegatedIf
3044
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
3045
+
3046
+ post_body = @api_client.object_to_http_body(update_network_security_groups_details)
3047
+
3048
+ # rubocop:disable Metrics/BlockLength
3049
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'LoadBalancerClient#update_network_security_groups') do
3050
+ @api_client.call_api(
3051
+ :PUT,
3052
+ path,
3053
+ endpoint,
3054
+ header_params: header_params,
3055
+ query_params: query_params,
3056
+ operation_signing_strategy: operation_signing_strategy,
3057
+ body: post_body
3058
+ )
3059
+ end
3060
+ # rubocop:enable Metrics/BlockLength
3061
+ end
3062
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
3063
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
3064
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
3065
+
3066
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
3067
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
3068
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
3069
+
3070
+
3007
3071
  # Overwrites an existing path route set on the specified load balancer. Use this operation to add, delete, or alter
3008
3072
  # path route rules in a path route set.
3009
3073
  #
@@ -1179,6 +1179,56 @@ module OCI
1179
1179
  # rubocop:disable Layout/EmptyLines
1180
1180
 
1181
1181
 
1182
+ # Calls {OCI::LoadBalancer::LoadBalancerClient#update_network_security_groups} and then waits for the {OCI::LoadBalancer::Models::WorkRequest}
1183
+ # to enter the given state(s).
1184
+ #
1185
+ # @param [OCI::LoadBalancer::Models::UpdateNetworkSecurityGroupsDetails] update_network_security_groups_details The details for updating the NSGs of the load balancer.
1186
+ # @param [String] load_balancer_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the load balancer on which update the NSGs.
1187
+ # @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::LoadBalancer::Models::WorkRequest#lifecycle_state}
1188
+ # @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::LoadBalancer::LoadBalancerClient#update_network_security_groups}
1189
+ # @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
1190
+ # * max_interval_seconds: The maximum interval between queries, in seconds.
1191
+ # * max_wait_seconds The maximum time to wait, in seconds
1192
+ #
1193
+ # @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::LoadBalancer::Models::WorkRequest}
1194
+ def update_network_security_groups_and_wait_for_state(update_network_security_groups_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
1195
+ operation_result = @service_client.update_network_security_groups(update_network_security_groups_details, load_balancer_id, base_operation_opts)
1196
+ use_util = OCI::LoadBalancer::Util.respond_to?(:wait_on_work_request)
1197
+
1198
+ return operation_result if wait_for_states.empty? && !use_util
1199
+
1200
+ lowered_wait_for_states = wait_for_states.map(&:downcase)
1201
+ wait_for_resource_id = operation_result.headers['opc-work-request-id']
1202
+
1203
+ begin
1204
+ if use_util
1205
+ waiter_result = OCI::LoadBalancer::Util.wait_on_work_request(
1206
+ @service_client,
1207
+ wait_for_resource_id,
1208
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
1209
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
1210
+ )
1211
+ else
1212
+ waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
1213
+ eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
1214
+ max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
1215
+ max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
1216
+ )
1217
+ end
1218
+ result_to_return = waiter_result
1219
+
1220
+ return result_to_return
1221
+ rescue StandardError
1222
+ raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
1223
+ end
1224
+ end
1225
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
1226
+ # rubocop:enable Layout/EmptyLines
1227
+
1228
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
1229
+ # rubocop:disable Layout/EmptyLines
1230
+
1231
+
1182
1232
  # Calls {OCI::LoadBalancer::LoadBalancerClient#update_path_route_set} and then waits for the {OCI::LoadBalancer::Models::WorkRequest}
1183
1233
  # to enter the given state(s).
1184
1234
  #
@@ -54,6 +54,11 @@ module OCI
54
54
  # @return [Hash<String, OCI::LoadBalancer::Models::BackendSetDetails>]
55
55
  attr_accessor :backend_sets
56
56
 
57
+ # The array of NSG [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) to be used by this Load Balancer.
58
+ #
59
+ # @return [Array<String>]
60
+ attr_accessor :network_security_group_ids
61
+
57
62
  # **[Required]** An array of subnet [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
58
63
  # @return [Array<String>]
59
64
  attr_accessor :subnet_ids
@@ -94,6 +99,7 @@ module OCI
94
99
  'listeners': :'listeners',
95
100
  'hostnames': :'hostnames',
96
101
  'backend_sets': :'backendSets',
102
+ 'network_security_group_ids': :'networkSecurityGroupIds',
97
103
  'subnet_ids': :'subnetIds',
98
104
  'certificates': :'certificates',
99
105
  'path_route_sets': :'pathRouteSets',
@@ -115,6 +121,7 @@ module OCI
115
121
  'listeners': :'Hash<String, OCI::LoadBalancer::Models::ListenerDetails>',
116
122
  'hostnames': :'Hash<String, OCI::LoadBalancer::Models::HostnameDetails>',
117
123
  'backend_sets': :'Hash<String, OCI::LoadBalancer::Models::BackendSetDetails>',
124
+ 'network_security_group_ids': :'Array<String>',
118
125
  'subnet_ids': :'Array<String>',
119
126
  'certificates': :'Hash<String, OCI::LoadBalancer::Models::CertificateDetails>',
120
127
  'path_route_sets': :'Hash<String, OCI::LoadBalancer::Models::PathRouteSetDetails>',
@@ -138,6 +145,7 @@ module OCI
138
145
  # @option attributes [Hash<String, OCI::LoadBalancer::Models::ListenerDetails>] :listeners The value to assign to the {#listeners} property
139
146
  # @option attributes [Hash<String, OCI::LoadBalancer::Models::HostnameDetails>] :hostnames The value to assign to the {#hostnames} property
140
147
  # @option attributes [Hash<String, OCI::LoadBalancer::Models::BackendSetDetails>] :backend_sets The value to assign to the {#backend_sets} property
148
+ # @option attributes [Array<String>] :network_security_group_ids The value to assign to the {#network_security_group_ids} property
141
149
  # @option attributes [Array<String>] :subnet_ids The value to assign to the {#subnet_ids} property
142
150
  # @option attributes [Hash<String, OCI::LoadBalancer::Models::CertificateDetails>] :certificates The value to assign to the {#certificates} property
143
151
  # @option attributes [Hash<String, OCI::LoadBalancer::Models::PathRouteSetDetails>] :path_route_sets The value to assign to the {#path_route_sets} property
@@ -186,6 +194,12 @@ module OCI
186
194
 
187
195
  self.backend_sets = attributes[:'backend_sets'] if attributes[:'backend_sets']
188
196
 
197
+ self.network_security_group_ids = attributes[:'networkSecurityGroupIds'] if attributes[:'networkSecurityGroupIds']
198
+
199
+ raise 'You cannot provide both :networkSecurityGroupIds and :network_security_group_ids' if attributes.key?(:'networkSecurityGroupIds') && attributes.key?(:'network_security_group_ids')
200
+
201
+ self.network_security_group_ids = attributes[:'network_security_group_ids'] if attributes[:'network_security_group_ids']
202
+
189
203
  self.subnet_ids = attributes[:'subnetIds'] if attributes[:'subnetIds']
190
204
 
191
205
  raise 'You cannot provide both :subnetIds and :subnet_ids' if attributes.key?(:'subnetIds') && attributes.key?(:'subnet_ids')
@@ -237,6 +251,7 @@ module OCI
237
251
  listeners == other.listeners &&
238
252
  hostnames == other.hostnames &&
239
253
  backend_sets == other.backend_sets &&
254
+ network_security_group_ids == other.network_security_group_ids &&
240
255
  subnet_ids == other.subnet_ids &&
241
256
  certificates == other.certificates &&
242
257
  path_route_sets == other.path_route_sets &&
@@ -258,7 +273,7 @@ module OCI
258
273
  # Calculates hash code according to all attributes.
259
274
  # @return [Fixnum] Hash code
260
275
  def hash
261
- [compartment_id, display_name, shape_name, is_private, listeners, hostnames, backend_sets, subnet_ids, certificates, path_route_sets, freeform_tags, defined_tags, rule_sets].hash
276
+ [compartment_id, display_name, shape_name, is_private, listeners, hostnames, backend_sets, network_security_group_ids, subnet_ids, certificates, path_route_sets, freeform_tags, defined_tags, rule_sets].hash
262
277
  end
263
278
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
264
279
 
@@ -86,6 +86,11 @@ module OCI
86
86
  # @return [Array<String>]
87
87
  attr_accessor :subnet_ids
88
88
 
89
+ # The array of NSG [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) in use by this Load Balancer.
90
+ #
91
+ # @return [Array<String>]
92
+ attr_accessor :network_security_group_ids
93
+
89
94
  # @return [Hash<String, OCI::LoadBalancer::Models::Listener>]
90
95
  attr_accessor :listeners
91
96
 
@@ -133,6 +138,7 @@ module OCI
133
138
  'shape_name': :'shapeName',
134
139
  'is_private': :'isPrivate',
135
140
  'subnet_ids': :'subnetIds',
141
+ 'network_security_group_ids': :'networkSecurityGroupIds',
136
142
  'listeners': :'listeners',
137
143
  'hostnames': :'hostnames',
138
144
  'certificates': :'certificates',
@@ -158,6 +164,7 @@ module OCI
158
164
  'shape_name': :'String',
159
165
  'is_private': :'BOOLEAN',
160
166
  'subnet_ids': :'Array<String>',
167
+ 'network_security_group_ids': :'Array<String>',
161
168
  'listeners': :'Hash<String, OCI::LoadBalancer::Models::Listener>',
162
169
  'hostnames': :'Hash<String, OCI::LoadBalancer::Models::Hostname>',
163
170
  'certificates': :'Hash<String, OCI::LoadBalancer::Models::Certificate>',
@@ -185,6 +192,7 @@ module OCI
185
192
  # @option attributes [String] :shape_name The value to assign to the {#shape_name} property
186
193
  # @option attributes [BOOLEAN] :is_private The value to assign to the {#is_private} property
187
194
  # @option attributes [Array<String>] :subnet_ids The value to assign to the {#subnet_ids} property
195
+ # @option attributes [Array<String>] :network_security_group_ids The value to assign to the {#network_security_group_ids} property
188
196
  # @option attributes [Hash<String, OCI::LoadBalancer::Models::Listener>] :listeners The value to assign to the {#listeners} property
189
197
  # @option attributes [Hash<String, OCI::LoadBalancer::Models::Hostname>] :hostnames The value to assign to the {#hostnames} property
190
198
  # @option attributes [Hash<String, OCI::LoadBalancer::Models::Certificate>] :certificates The value to assign to the {#certificates} property
@@ -249,6 +257,12 @@ module OCI
249
257
 
250
258
  self.subnet_ids = attributes[:'subnet_ids'] if attributes[:'subnet_ids']
251
259
 
260
+ self.network_security_group_ids = attributes[:'networkSecurityGroupIds'] if attributes[:'networkSecurityGroupIds']
261
+
262
+ raise 'You cannot provide both :networkSecurityGroupIds and :network_security_group_ids' if attributes.key?(:'networkSecurityGroupIds') && attributes.key?(:'network_security_group_ids')
263
+
264
+ self.network_security_group_ids = attributes[:'network_security_group_ids'] if attributes[:'network_security_group_ids']
265
+
252
266
  self.listeners = attributes[:'listeners'] if attributes[:'listeners']
253
267
 
254
268
  self.hostnames = attributes[:'hostnames'] if attributes[:'hostnames']
@@ -319,6 +333,7 @@ module OCI
319
333
  shape_name == other.shape_name &&
320
334
  is_private == other.is_private &&
321
335
  subnet_ids == other.subnet_ids &&
336
+ network_security_group_ids == other.network_security_group_ids &&
322
337
  listeners == other.listeners &&
323
338
  hostnames == other.hostnames &&
324
339
  certificates == other.certificates &&
@@ -342,7 +357,7 @@ module OCI
342
357
  # Calculates hash code according to all attributes.
343
358
  # @return [Fixnum] Hash code
344
359
  def hash
345
- [id, compartment_id, display_name, lifecycle_state, time_created, ip_addresses, shape_name, is_private, subnet_ids, listeners, hostnames, certificates, backend_sets, path_route_sets, freeform_tags, defined_tags, rule_sets].hash
360
+ [id, compartment_id, display_name, lifecycle_state, time_created, ip_addresses, shape_name, is_private, subnet_ids, network_security_group_ids, listeners, hostnames, certificates, backend_sets, path_route_sets, freeform_tags, defined_tags, rule_sets].hash
346
361
  end
347
362
  # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
348
363