oci 2.3.7 → 2.3.8

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/oci/core/blockstorage_client.rb +56 -24
  4. data/lib/oci/core/compute_client.rb +578 -24
  5. data/lib/oci/core/core.rb +11 -0
  6. data/lib/oci/core/models/app_catalog_listing.rb +242 -0
  7. data/lib/oci/core/models/app_catalog_listing_resource_version.rb +295 -0
  8. data/lib/oci/core/models/app_catalog_listing_resource_version_agreements.rb +219 -0
  9. data/lib/oci/core/models/app_catalog_listing_resource_version_summary.rb +194 -0
  10. data/lib/oci/core/models/app_catalog_listing_summary.rb +188 -0
  11. data/lib/oci/core/models/app_catalog_subscription.rb +246 -0
  12. data/lib/oci/core/models/app_catalog_subscription_summary.rb +246 -0
  13. data/lib/oci/core/models/create_app_catalog_subscription_details.rb +232 -0
  14. data/lib/oci/core/models/create_nat_gateway_details.rb +239 -0
  15. data/lib/oci/core/models/launch_instance_details.rb +4 -0
  16. data/lib/oci/core/models/nat_gateway.rb +333 -0
  17. data/lib/oci/core/models/public_ip.rb +76 -13
  18. data/lib/oci/core/models/service_gateway.rb +9 -4
  19. data/lib/oci/core/models/update_nat_gateway_details.rb +208 -0
  20. data/lib/oci/core/models/update_service_gateway_details.rb +9 -4
  21. data/lib/oci/core/virtual_network_client.rb +546 -91
  22. data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
  23. data/lib/oci/object_storage/models/bucket.rb +18 -4
  24. data/lib/oci/object_storage/models/copy_object_details.rb +269 -0
  25. data/lib/oci/object_storage/models/multipart_upload.rb +1 -1
  26. data/lib/oci/object_storage/models/namespace_metadata.rb +1 -1
  27. data/lib/oci/object_storage/models/object_lifecycle_policy.rb +167 -0
  28. data/lib/oci/object_storage/models/object_lifecycle_rule.rb +245 -0
  29. data/lib/oci/object_storage/models/object_name_filter.rb +153 -0
  30. data/lib/oci/object_storage/models/preauthenticated_request.rb +1 -1
  31. data/lib/oci/object_storage/models/put_object_lifecycle_policy_details.rb +147 -0
  32. data/lib/oci/object_storage/models/restore_objects_details.rb +2 -2
  33. data/lib/oci/object_storage/models/work_request.rb +304 -0
  34. data/lib/oci/object_storage/models/work_request_error.rb +168 -0
  35. data/lib/oci/object_storage/models/work_request_log_entry.rb +156 -0
  36. data/lib/oci/object_storage/models/work_request_resource.rb +225 -0
  37. data/lib/oci/object_storage/models/work_request_resource_metadata_key.rb +12 -0
  38. data/lib/oci/object_storage/models/work_request_summary.rb +304 -0
  39. data/lib/oci/object_storage/object_storage.rb +12 -0
  40. data/lib/oci/object_storage/object_storage_client.rb +542 -17
  41. data/lib/oci/object_storage/object_storage_client_composite_operations.rb +53 -0
  42. data/lib/oci/version.rb +1 -1
  43. metadata +24 -2
@@ -0,0 +1,12 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ module OCI
4
+ module ObjectStorage::Models
5
+ WORK_REQUEST_RESOURCE_METADATA_KEY_ENUM = [
6
+ WORK_REQUEST_RESOURCE_METADATA_KEY_REGION = 'REGION'.freeze,
7
+ WORK_REQUEST_RESOURCE_METADATA_KEY_NAMESPACE = 'NAMESPACE'.freeze,
8
+ WORK_REQUEST_RESOURCE_METADATA_KEY_BUCKET = 'BUCKET'.freeze,
9
+ WORK_REQUEST_RESOURCE_METADATA_KEY_OBJECT = 'OBJECT'.freeze
10
+ ].freeze
11
+ end
12
+ end
@@ -0,0 +1,304 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+ require 'logger'
5
+
6
+ # rubocop:disable Lint/UnneededCopDisableDirective
7
+ module OCI
8
+ # A summary of workRequest status
9
+ class ObjectStorage::Models::WorkRequestSummary # rubocop:disable Metrics/LineLength
10
+ OPERATION_TYPE_ENUM = [
11
+ OPERATION_TYPE_COPY_OBJECT = 'COPY_OBJECT'.freeze,
12
+ OPERATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
13
+ ].freeze
14
+
15
+ STATUS_ENUM = [
16
+ STATUS_ACCEPTED = 'ACCEPTED'.freeze,
17
+ STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
18
+ STATUS_FAILED = 'FAILED'.freeze,
19
+ STATUS_COMPLETED = 'COMPLETED'.freeze,
20
+ STATUS_CANCELING = 'CANCELING'.freeze,
21
+ STATUS_CANCELED = 'CANCELED'.freeze,
22
+ STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
23
+ ].freeze
24
+
25
+ # type of the work request
26
+ # @return [String]
27
+ attr_reader :operation_type
28
+
29
+ # status of current work request.
30
+ # @return [String]
31
+ attr_reader :status
32
+
33
+ # The id of the work request.
34
+ # @return [String]
35
+ attr_accessor :id
36
+
37
+ # The ocid of the compartment that contains the work request. Work requests should be scoped to
38
+ # the same compartment as the resource the work request affects. If the work request affects multiple resources,
39
+ # and those resources are not in the same compartment, it is up to the service team to pick the primary
40
+ # resource whose compartment should be used
41
+ #
42
+ # @return [String]
43
+ attr_accessor :compartment_id
44
+
45
+ # @return [Array<OCI::ObjectStorage::Models::WorkRequestResource>]
46
+ attr_accessor :resources
47
+
48
+ # Percentage of the request completed.
49
+ # @return [Float]
50
+ attr_accessor :percent_complete
51
+
52
+ # The date and time the request was created, as described in
53
+ # [RFC 3339](https://tools.ietf.org/rfc/rfc3339), section 14.29.
54
+ #
55
+ # @return [DateTime]
56
+ attr_accessor :time_accepted
57
+
58
+ # The date and time the request was started, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339),
59
+ # section 14.29.
60
+ #
61
+ # @return [DateTime]
62
+ attr_accessor :time_started
63
+
64
+ # The date and time the object was finished, as described in [RFC 3339](https://tools.ietf.org/rfc/rfc3339).
65
+ #
66
+ # @return [DateTime]
67
+ attr_accessor :time_finished
68
+
69
+ # Attribute mapping from ruby-style variable name to JSON key.
70
+ def self.attribute_map
71
+ {
72
+ # rubocop:disable Style/SymbolLiteral
73
+ 'operation_type': :'operationType',
74
+ 'status': :'status',
75
+ 'id': :'id',
76
+ 'compartment_id': :'compartmentId',
77
+ 'resources': :'resources',
78
+ 'percent_complete': :'percentComplete',
79
+ 'time_accepted': :'timeAccepted',
80
+ 'time_started': :'timeStarted',
81
+ 'time_finished': :'timeFinished'
82
+ # rubocop:enable Style/SymbolLiteral
83
+ }
84
+ end
85
+
86
+ # Attribute type mapping.
87
+ def self.swagger_types
88
+ {
89
+ # rubocop:disable Style/SymbolLiteral
90
+ 'operation_type': :'String',
91
+ 'status': :'String',
92
+ 'id': :'String',
93
+ 'compartment_id': :'String',
94
+ 'resources': :'Array<OCI::ObjectStorage::Models::WorkRequestResource>',
95
+ 'percent_complete': :'Float',
96
+ 'time_accepted': :'DateTime',
97
+ 'time_started': :'DateTime',
98
+ 'time_finished': :'DateTime'
99
+ # rubocop:enable Style/SymbolLiteral
100
+ }
101
+ end
102
+
103
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
104
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
105
+
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @option attributes [String] :operation_type The value to assign to the {#operation_type} property
110
+ # @option attributes [String] :status The value to assign to the {#status} property
111
+ # @option attributes [String] :id The value to assign to the {#id} property
112
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
113
+ # @option attributes [Array<OCI::ObjectStorage::Models::WorkRequestResource>] :resources The value to assign to the {#resources} property
114
+ # @option attributes [Float] :percent_complete The value to assign to the {#percent_complete} property
115
+ # @option attributes [DateTime] :time_accepted The value to assign to the {#time_accepted} property
116
+ # @option attributes [DateTime] :time_started The value to assign to the {#time_started} property
117
+ # @option attributes [DateTime] :time_finished The value to assign to the {#time_finished} property
118
+ def initialize(attributes = {})
119
+ return unless attributes.is_a?(Hash)
120
+
121
+ # convert string to symbol for hash key
122
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
123
+
124
+ self.operation_type = attributes[:'operationType'] if attributes[:'operationType']
125
+
126
+ raise 'You cannot provide both :operationType and :operation_type' if attributes.key?(:'operationType') && attributes.key?(:'operation_type')
127
+
128
+ self.operation_type = attributes[:'operation_type'] if attributes[:'operation_type']
129
+
130
+ self.status = attributes[:'status'] if attributes[:'status']
131
+
132
+ self.id = attributes[:'id'] if attributes[:'id']
133
+
134
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
135
+
136
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
137
+
138
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
139
+
140
+ self.resources = attributes[:'resources'] if attributes[:'resources']
141
+
142
+ self.percent_complete = attributes[:'percentComplete'] if attributes[:'percentComplete']
143
+
144
+ raise 'You cannot provide both :percentComplete and :percent_complete' if attributes.key?(:'percentComplete') && attributes.key?(:'percent_complete')
145
+
146
+ self.percent_complete = attributes[:'percent_complete'] if attributes[:'percent_complete']
147
+
148
+ self.time_accepted = attributes[:'timeAccepted'] if attributes[:'timeAccepted']
149
+
150
+ raise 'You cannot provide both :timeAccepted and :time_accepted' if attributes.key?(:'timeAccepted') && attributes.key?(:'time_accepted')
151
+
152
+ self.time_accepted = attributes[:'time_accepted'] if attributes[:'time_accepted']
153
+
154
+ self.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted']
155
+
156
+ raise 'You cannot provide both :timeStarted and :time_started' if attributes.key?(:'timeStarted') && attributes.key?(:'time_started')
157
+
158
+ self.time_started = attributes[:'time_started'] if attributes[:'time_started']
159
+
160
+ self.time_finished = attributes[:'timeFinished'] if attributes[:'timeFinished']
161
+
162
+ raise 'You cannot provide both :timeFinished and :time_finished' if attributes.key?(:'timeFinished') && attributes.key?(:'time_finished')
163
+
164
+ self.time_finished = attributes[:'time_finished'] if attributes[:'time_finished']
165
+ end
166
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
167
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
168
+
169
+ # Custom attribute writer method checking allowed values (enum).
170
+ # @param [Object] operation_type Object to be assigned
171
+ def operation_type=(operation_type)
172
+ # rubocop:disable Style/ConditionalAssignment
173
+ if operation_type && !OPERATION_TYPE_ENUM.include?(operation_type)
174
+ # rubocop: disable Metrics/LineLength
175
+ OCI.logger.debug("Unknown value for 'operation_type' [" + operation_type + "]. Mapping to 'OPERATION_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger
176
+ # rubocop: enable Metrics/LineLength
177
+ @operation_type = OPERATION_TYPE_UNKNOWN_ENUM_VALUE
178
+ else
179
+ @operation_type = operation_type
180
+ end
181
+ # rubocop:enable Style/ConditionalAssignment
182
+ end
183
+
184
+ # Custom attribute writer method checking allowed values (enum).
185
+ # @param [Object] status Object to be assigned
186
+ def status=(status)
187
+ # rubocop:disable Style/ConditionalAssignment
188
+ if status && !STATUS_ENUM.include?(status)
189
+ # rubocop: disable Metrics/LineLength
190
+ OCI.logger.debug("Unknown value for 'status' [" + status + "]. Mapping to 'STATUS_UNKNOWN_ENUM_VALUE'") if OCI.logger
191
+ # rubocop: enable Metrics/LineLength
192
+ @status = STATUS_UNKNOWN_ENUM_VALUE
193
+ else
194
+ @status = status
195
+ end
196
+ # rubocop:enable Style/ConditionalAssignment
197
+ end
198
+
199
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
200
+
201
+
202
+ # Checks equality by comparing each attribute.
203
+ # @param [Object] other the other object to be compared
204
+ def ==(other)
205
+ return true if equal?(other)
206
+ self.class == other.class &&
207
+ operation_type == other.operation_type &&
208
+ status == other.status &&
209
+ id == other.id &&
210
+ compartment_id == other.compartment_id &&
211
+ resources == other.resources &&
212
+ percent_complete == other.percent_complete &&
213
+ time_accepted == other.time_accepted &&
214
+ time_started == other.time_started &&
215
+ time_finished == other.time_finished
216
+ end
217
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
218
+
219
+ # @see the `==` method
220
+ # @param [Object] other the other object to be compared
221
+ def eql?(other)
222
+ self == other
223
+ end
224
+
225
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
226
+
227
+
228
+ # Calculates hash code according to all attributes.
229
+ # @return [Fixnum] Hash code
230
+ def hash
231
+ [operation_type, status, id, compartment_id, resources, percent_complete, time_accepted, time_started, time_finished].hash
232
+ end
233
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
234
+
235
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
236
+
237
+
238
+ # Builds the object from hash
239
+ # @param [Hash] attributes Model attributes in the form of hash
240
+ # @return [Object] Returns the model itself
241
+ def build_from_hash(attributes)
242
+ return nil unless attributes.is_a?(Hash)
243
+ self.class.swagger_types.each_pair do |key, type|
244
+ if type =~ /^Array<(.*)>/i
245
+ # check to ensure the input is an array given that the the attribute
246
+ # is documented as an array but the input is not
247
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
248
+ public_method("#{key}=").call(
249
+ attributes[self.class.attribute_map[key]]
250
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
251
+ )
252
+ end
253
+ elsif !attributes[self.class.attribute_map[key]].nil?
254
+ public_method("#{key}=").call(
255
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
256
+ )
257
+ end
258
+ # or else data not found in attributes(hash), not an issue as the data can be optional
259
+ end
260
+
261
+ self
262
+ end
263
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
264
+
265
+ # Returns the string representation of the object
266
+ # @return [String] String presentation of the object
267
+ def to_s
268
+ to_hash.to_s
269
+ end
270
+
271
+ # Returns the object in the form of hash
272
+ # @return [Hash] Returns the object in the form of hash
273
+ def to_hash
274
+ hash = {}
275
+ self.class.attribute_map.each_pair do |attr, param|
276
+ value = public_method(attr).call
277
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
278
+ hash[param] = _to_hash(value)
279
+ end
280
+ hash
281
+ end
282
+
283
+ private
284
+
285
+ # Outputs non-array value in the form of hash
286
+ # For object, use to_hash. Otherwise, just return the value
287
+ # @param [Object] value Any valid value
288
+ # @return [Hash] Returns the value in the form of hash
289
+ def _to_hash(value)
290
+ if value.is_a?(Array)
291
+ value.compact.map { |v| _to_hash(v) }
292
+ elsif value.is_a?(Hash)
293
+ {}.tap do |hash|
294
+ value.each { |k, v| hash[k] = _to_hash(v) }
295
+ end
296
+ elsif value.respond_to? :to_hash
297
+ value.to_hash
298
+ else
299
+ value
300
+ end
301
+ end
302
+ end
303
+ end
304
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -14,6 +14,7 @@ require 'oci/object_storage/models/bucket'
14
14
  require 'oci/object_storage/models/bucket_summary'
15
15
  require 'oci/object_storage/models/commit_multipart_upload_details'
16
16
  require 'oci/object_storage/models/commit_multipart_upload_part_details'
17
+ require 'oci/object_storage/models/copy_object_details'
17
18
  require 'oci/object_storage/models/create_bucket_details'
18
19
  require 'oci/object_storage/models/create_multipart_upload_details'
19
20
  require 'oci/object_storage/models/create_preauthenticated_request_details'
@@ -21,16 +22,27 @@ require 'oci/object_storage/models/list_objects'
21
22
  require 'oci/object_storage/models/multipart_upload'
22
23
  require 'oci/object_storage/models/multipart_upload_part_summary'
23
24
  require 'oci/object_storage/models/namespace_metadata'
25
+ require 'oci/object_storage/models/object_lifecycle_policy'
26
+ require 'oci/object_storage/models/object_lifecycle_rule'
27
+ require 'oci/object_storage/models/object_name_filter'
24
28
  require 'oci/object_storage/models/object_summary'
25
29
  require 'oci/object_storage/models/preauthenticated_request'
26
30
  require 'oci/object_storage/models/preauthenticated_request_summary'
31
+ require 'oci/object_storage/models/put_object_lifecycle_policy_details'
27
32
  require 'oci/object_storage/models/rename_object_details'
28
33
  require 'oci/object_storage/models/restore_objects_details'
29
34
  require 'oci/object_storage/models/update_bucket_details'
30
35
  require 'oci/object_storage/models/update_namespace_metadata_details'
36
+ require 'oci/object_storage/models/work_request'
37
+ require 'oci/object_storage/models/work_request_error'
38
+ require 'oci/object_storage/models/work_request_log_entry'
39
+ require 'oci/object_storage/models/work_request_resource'
40
+ require 'oci/object_storage/models/work_request_resource_metadata_key'
41
+ require 'oci/object_storage/models/work_request_summary'
31
42
 
32
43
  # Require generated clients
33
44
  require 'oci/object_storage/object_storage_client'
45
+ require 'oci/object_storage/object_storage_client_composite_operations'
34
46
 
35
47
  # Require service utilities
36
48
  require 'oci/object_storage/util'
@@ -5,7 +5,7 @@ require 'logger'
5
5
 
6
6
  # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
7
7
  module OCI
8
- # Common set of Object and Archive Storage APIs for managing buckets and objects.
8
+ # The Object and Archive Storage APIs for managing buckets and objects.
9
9
  class ObjectStorage::ObjectStorageClient
10
10
  # Client used to make HTTP requests.
11
11
  # @return [OCI::ApiClient]
@@ -167,6 +167,59 @@ module OCI
167
167
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
168
168
 
169
169
 
170
+ # Cancel a work request.
171
+ #
172
+ # @param [String] work_request_id The ID of the asynchronous request.
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
175
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
176
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
177
+ # @return [Response] A Response object with data of type nil
178
+ def cancel_work_request(work_request_id, opts = {})
179
+ logger.debug 'Calling operation ObjectStorageClient#cancel_work_request.' if logger
180
+
181
+ raise "Missing the required parameter 'work_request_id' when calling cancel_work_request." if work_request_id.nil?
182
+ raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
183
+
184
+ path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
185
+ operation_signing_strategy = :standard
186
+
187
+ # rubocop:disable Style/NegatedIf
188
+ # Query Params
189
+ query_params = {}
190
+
191
+ # Header Params
192
+ header_params = {}
193
+ header_params[:accept] = 'application/json'
194
+ header_params[:'content-type'] = 'application/json'
195
+ header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
196
+ # rubocop:enable Style/NegatedIf
197
+
198
+ post_body = nil
199
+
200
+ # rubocop:disable Metrics/BlockLength
201
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#cancel_work_request') do
202
+ @api_client.call_api(
203
+ :DELETE,
204
+ path,
205
+ endpoint,
206
+ header_params: header_params,
207
+ query_params: query_params,
208
+ operation_signing_strategy: operation_signing_strategy,
209
+ body: post_body
210
+ )
211
+ end
212
+ # rubocop:enable Metrics/BlockLength
213
+ end
214
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
215
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
216
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
217
+
218
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
219
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
220
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
221
+
222
+
170
223
  # Commits a multipart upload, which involves checking part numbers and ETags of the parts, to create an aggregate object.
171
224
  #
172
225
  # @param [String] namespace_name The top-level namespace used for the request.
@@ -184,7 +237,7 @@ module OCI
184
237
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
185
238
  # For uploading a part, this is the entity tag of the target part.
186
239
  #
187
- # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
240
+ # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists.
188
241
  # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
189
242
  #
190
243
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -243,8 +296,66 @@ module OCI
243
296
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
244
297
 
245
298
 
246
- # Creates a bucket in the given namespace with a bucket name and optional user-defined metadata. Avoid entering confidential
247
- # information in bucket names.
299
+ # Create a request for copy object within or cross region
300
+ # @param [String] namespace_name The top-level namespace used for the request.
301
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
302
+ # Example: `my-new-bucket1`
303
+ #
304
+ # @param [OCI::ObjectStorage::Models::CopyObjectDetails] copy_object_details The source and destination for object to be copied.
305
+ # @param [Hash] opts the optional parameters
306
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
307
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
308
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
309
+ # @return [Response] A Response object with data of type nil
310
+ def copy_object(namespace_name, bucket_name, copy_object_details, opts = {})
311
+ logger.debug 'Calling operation ObjectStorageClient#copy_object.' if logger
312
+
313
+ raise "Missing the required parameter 'namespace_name' when calling copy_object." if namespace_name.nil?
314
+ raise "Missing the required parameter 'bucket_name' when calling copy_object." if bucket_name.nil?
315
+ raise "Missing the required parameter 'copy_object_details' when calling copy_object." if copy_object_details.nil?
316
+ raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
317
+ raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
318
+
319
+ path = '/n/{namespaceName}/b/{bucketName}/actions/copyObject'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
320
+ operation_signing_strategy = :standard
321
+
322
+ # rubocop:disable Style/NegatedIf
323
+ # Query Params
324
+ query_params = {}
325
+
326
+ # Header Params
327
+ header_params = {}
328
+ header_params[:accept] = 'application/json'
329
+ header_params[:'content-type'] = 'application/json'
330
+ header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
331
+ # rubocop:enable Style/NegatedIf
332
+
333
+ post_body = @api_client.object_to_http_body(copy_object_details)
334
+
335
+ # rubocop:disable Metrics/BlockLength
336
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#copy_object') do
337
+ @api_client.call_api(
338
+ :POST,
339
+ path,
340
+ endpoint,
341
+ header_params: header_params,
342
+ query_params: query_params,
343
+ operation_signing_strategy: operation_signing_strategy,
344
+ body: post_body
345
+ )
346
+ end
347
+ # rubocop:enable Metrics/BlockLength
348
+ end
349
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
350
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
351
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
352
+
353
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
354
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
355
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
356
+
357
+
358
+ # Creates a bucket in the given namespace with a bucket name and optional user-defined metadata.
248
359
  #
249
360
  # @param [String] namespace_name The top-level namespace used for the request.
250
361
  # @param [OCI::ObjectStorage::Models::CreateBucketDetails] create_bucket_details Request object for creating a bucket.
@@ -313,7 +424,7 @@ module OCI
313
424
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
314
425
  # For uploading a part, this is the entity tag of the target part.
315
426
  #
316
- # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
427
+ # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists.
317
428
  # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
318
429
  #
319
430
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -559,6 +670,68 @@ module OCI
559
670
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
560
671
 
561
672
 
673
+ # Deletes the object lifecycle policy for the bucket.
674
+ #
675
+ # @param [String] namespace_name The top-level namespace used for the request.
676
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
677
+ # Example: `my-new-bucket1`
678
+ #
679
+ # @param [Hash] opts the optional parameters
680
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
681
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
682
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
683
+ # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
684
+ # For uploading a part, this is the entity tag of the target part.
685
+ #
686
+ # @return [Response] A Response object with data of type nil
687
+ def delete_object_lifecycle_policy(namespace_name, bucket_name, opts = {})
688
+ logger.debug 'Calling operation ObjectStorageClient#delete_object_lifecycle_policy.' if logger
689
+
690
+ raise "Missing the required parameter 'namespace_name' when calling delete_object_lifecycle_policy." if namespace_name.nil?
691
+ raise "Missing the required parameter 'bucket_name' when calling delete_object_lifecycle_policy." if bucket_name.nil?
692
+ raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
693
+ raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
694
+
695
+ path = '/n/{namespaceName}/b/{bucketName}/l'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
696
+ operation_signing_strategy = :standard
697
+
698
+ # rubocop:disable Style/NegatedIf
699
+ # Query Params
700
+ query_params = {}
701
+
702
+ # Header Params
703
+ header_params = {}
704
+ header_params[:accept] = 'application/json'
705
+ header_params[:'content-type'] = 'application/json'
706
+ header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
707
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
708
+ # rubocop:enable Style/NegatedIf
709
+
710
+ post_body = nil
711
+
712
+ # rubocop:disable Metrics/BlockLength
713
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#delete_object_lifecycle_policy') do
714
+ @api_client.call_api(
715
+ :DELETE,
716
+ path,
717
+ endpoint,
718
+ header_params: header_params,
719
+ query_params: query_params,
720
+ operation_signing_strategy: operation_signing_strategy,
721
+ body: post_body
722
+ )
723
+ end
724
+ # rubocop:enable Metrics/BlockLength
725
+ end
726
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
727
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
728
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
729
+
730
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
731
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
732
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
733
+
734
+
562
735
  # Deletes the pre-authenticated request for the bucket.
563
736
  # @param [String] namespace_name The top-level namespace used for the request.
564
737
  # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
@@ -633,7 +806,7 @@ module OCI
633
806
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
634
807
  # For uploading a part, this is the entity tag of the target part.
635
808
  #
636
- # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
809
+ # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists.
637
810
  # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
638
811
  #
639
812
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -688,8 +861,7 @@ module OCI
688
861
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
689
862
 
690
863
 
691
- # Namespaces are unique. Namespaces are either the tenancy name or a random string automatically generated during
692
- # account creation. You cannot edit a namespace.
864
+ # Gets the name of the namespace for the user making the request.
693
865
  #
694
866
  # @param [Hash] opts the optional parameters
695
867
  # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
@@ -812,7 +984,7 @@ module OCI
812
984
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
813
985
  # For uploading a part, this is the entity tag of the target part.
814
986
  #
815
- # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
987
+ # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists.
816
988
  # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
817
989
  #
818
990
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -919,6 +1091,65 @@ module OCI
919
1091
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
920
1092
 
921
1093
 
1094
+ # Gets the object lifecycle policy for the bucket.
1095
+ #
1096
+ # @param [String] namespace_name The top-level namespace used for the request.
1097
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
1098
+ # Example: `my-new-bucket1`
1099
+ #
1100
+ # @param [Hash] opts the optional parameters
1101
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1102
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1103
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
1104
+ # @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::ObjectLifecyclePolicy ObjectLifecyclePolicy}
1105
+ def get_object_lifecycle_policy(namespace_name, bucket_name, opts = {})
1106
+ logger.debug 'Calling operation ObjectStorageClient#get_object_lifecycle_policy.' if logger
1107
+
1108
+ raise "Missing the required parameter 'namespace_name' when calling get_object_lifecycle_policy." if namespace_name.nil?
1109
+ raise "Missing the required parameter 'bucket_name' when calling get_object_lifecycle_policy." if bucket_name.nil?
1110
+ raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
1111
+ raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
1112
+
1113
+ path = '/n/{namespaceName}/b/{bucketName}/l'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
1114
+ operation_signing_strategy = :standard
1115
+
1116
+ # rubocop:disable Style/NegatedIf
1117
+ # Query Params
1118
+ query_params = {}
1119
+
1120
+ # Header Params
1121
+ header_params = {}
1122
+ header_params[:accept] = 'application/json'
1123
+ header_params[:'content-type'] = 'application/json'
1124
+ header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
1125
+ # rubocop:enable Style/NegatedIf
1126
+
1127
+ post_body = nil
1128
+
1129
+ # rubocop:disable Metrics/BlockLength
1130
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#get_object_lifecycle_policy') do
1131
+ @api_client.call_api(
1132
+ :GET,
1133
+ path,
1134
+ endpoint,
1135
+ header_params: header_params,
1136
+ query_params: query_params,
1137
+ operation_signing_strategy: operation_signing_strategy,
1138
+ body: post_body,
1139
+ return_type: 'OCI::ObjectStorage::Models::ObjectLifecyclePolicy'
1140
+ )
1141
+ end
1142
+ # rubocop:enable Metrics/BlockLength
1143
+ end
1144
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1145
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1146
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1147
+
1148
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1149
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1150
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1151
+
1152
+
922
1153
  # Gets the pre-authenticated request for the bucket.
923
1154
  # @param [String] namespace_name The top-level namespace used for the request.
924
1155
  # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
@@ -982,6 +1213,59 @@ module OCI
982
1213
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
983
1214
 
984
1215
 
1216
+ # Gets the status of the work request with the given ID.
1217
+ # @param [String] work_request_id The ID of the asynchronous request.
1218
+ # @param [Hash] opts the optional parameters
1219
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1220
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1221
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
1222
+ # @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::WorkRequest WorkRequest}
1223
+ def get_work_request(work_request_id, opts = {})
1224
+ logger.debug 'Calling operation ObjectStorageClient#get_work_request.' if logger
1225
+
1226
+ raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
1227
+ raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
1228
+
1229
+ path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
1230
+ operation_signing_strategy = :standard
1231
+
1232
+ # rubocop:disable Style/NegatedIf
1233
+ # Query Params
1234
+ query_params = {}
1235
+
1236
+ # Header Params
1237
+ header_params = {}
1238
+ header_params[:accept] = 'application/json'
1239
+ header_params[:'content-type'] = 'application/json'
1240
+ header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
1241
+ # rubocop:enable Style/NegatedIf
1242
+
1243
+ post_body = nil
1244
+
1245
+ # rubocop:disable Metrics/BlockLength
1246
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#get_work_request') do
1247
+ @api_client.call_api(
1248
+ :GET,
1249
+ path,
1250
+ endpoint,
1251
+ header_params: header_params,
1252
+ query_params: query_params,
1253
+ operation_signing_strategy: operation_signing_strategy,
1254
+ body: post_body,
1255
+ return_type: 'OCI::ObjectStorage::Models::WorkRequest'
1256
+ )
1257
+ end
1258
+ # rubocop:enable Metrics/BlockLength
1259
+ end
1260
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1261
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1262
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1263
+
1264
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1265
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1266
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1267
+
1268
+
985
1269
  # Efficiently checks to see if a bucket exists and gets the current ETag for the bucket.
986
1270
  #
987
1271
  # @param [String] namespace_name The top-level namespace used for the request.
@@ -994,7 +1278,7 @@ module OCI
994
1278
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
995
1279
  # For uploading a part, this is the entity tag of the target part.
996
1280
  #
997
- # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
1281
+ # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists.
998
1282
  # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
999
1283
  #
1000
1284
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -1063,7 +1347,7 @@ module OCI
1063
1347
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
1064
1348
  # For uploading a part, this is the entity tag of the target part.
1065
1349
  #
1066
- # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
1350
+ # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists.
1067
1351
  # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
1068
1352
  #
1069
1353
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -1484,7 +1768,179 @@ module OCI
1484
1768
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1485
1769
 
1486
1770
 
1487
- # Creates a new object or overwrites an existing one. See [Special Instructions for Object Storage PUT](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/signingrequests.htm#ObjectStoragePut) for request signature requirements.
1771
+ # Lists the errors of the work request with the given ID.
1772
+ # @param [String] work_request_id The ID of the asynchronous request.
1773
+ # @param [Hash] opts the optional parameters
1774
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1775
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1776
+ # @option opts [String] :page The page at which to start retrieving results.
1777
+ # @option opts [Integer] :limit The maximum number of items to return.
1778
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
1779
+ # @return [Response] A Response object with data of type Array<{OCI::ObjectStorage::Models::WorkRequestError WorkRequestError}>
1780
+ def list_work_request_errors(work_request_id, opts = {})
1781
+ logger.debug 'Calling operation ObjectStorageClient#list_work_request_errors.' if logger
1782
+
1783
+ raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?
1784
+ raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
1785
+
1786
+ path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
1787
+ operation_signing_strategy = :standard
1788
+
1789
+ # rubocop:disable Style/NegatedIf
1790
+ # Query Params
1791
+ query_params = {}
1792
+ query_params[:page] = opts[:page] if opts[:page]
1793
+ query_params[:limit] = opts[:limit] if opts[:limit]
1794
+
1795
+ # Header Params
1796
+ header_params = {}
1797
+ header_params[:accept] = 'application/json'
1798
+ header_params[:'content-type'] = 'application/json'
1799
+ header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
1800
+ # rubocop:enable Style/NegatedIf
1801
+
1802
+ post_body = nil
1803
+
1804
+ # rubocop:disable Metrics/BlockLength
1805
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#list_work_request_errors') do
1806
+ @api_client.call_api(
1807
+ :GET,
1808
+ path,
1809
+ endpoint,
1810
+ header_params: header_params,
1811
+ query_params: query_params,
1812
+ operation_signing_strategy: operation_signing_strategy,
1813
+ body: post_body,
1814
+ return_type: 'Array<OCI::ObjectStorage::Models::WorkRequestError>'
1815
+ )
1816
+ end
1817
+ # rubocop:enable Metrics/BlockLength
1818
+ end
1819
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1820
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1821
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1822
+
1823
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1824
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1825
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1826
+
1827
+
1828
+ # Lists the logs of the work request with the given ID.
1829
+ # @param [String] work_request_id The ID of the asynchronous request.
1830
+ # @param [Hash] opts the optional parameters
1831
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1832
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1833
+ # @option opts [String] :page The page at which to start retrieving results.
1834
+ # @option opts [Integer] :limit The maximum number of items to return.
1835
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
1836
+ # @return [Response] A Response object with data of type Array<{OCI::ObjectStorage::Models::WorkRequestLogEntry WorkRequestLogEntry}>
1837
+ def list_work_request_logs(work_request_id, opts = {})
1838
+ logger.debug 'Calling operation ObjectStorageClient#list_work_request_logs.' if logger
1839
+
1840
+ raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?
1841
+ raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
1842
+
1843
+ path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
1844
+ operation_signing_strategy = :standard
1845
+
1846
+ # rubocop:disable Style/NegatedIf
1847
+ # Query Params
1848
+ query_params = {}
1849
+ query_params[:page] = opts[:page] if opts[:page]
1850
+ query_params[:limit] = opts[:limit] if opts[:limit]
1851
+
1852
+ # Header Params
1853
+ header_params = {}
1854
+ header_params[:accept] = 'application/json'
1855
+ header_params[:'content-type'] = 'application/json'
1856
+ header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
1857
+ # rubocop:enable Style/NegatedIf
1858
+
1859
+ post_body = nil
1860
+
1861
+ # rubocop:disable Metrics/BlockLength
1862
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#list_work_request_logs') do
1863
+ @api_client.call_api(
1864
+ :GET,
1865
+ path,
1866
+ endpoint,
1867
+ header_params: header_params,
1868
+ query_params: query_params,
1869
+ operation_signing_strategy: operation_signing_strategy,
1870
+ body: post_body,
1871
+ return_type: 'Array<OCI::ObjectStorage::Models::WorkRequestLogEntry>'
1872
+ )
1873
+ end
1874
+ # rubocop:enable Metrics/BlockLength
1875
+ end
1876
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1877
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1878
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1879
+
1880
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1881
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1882
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1883
+
1884
+
1885
+ # Lists the work requests in a compartment.
1886
+ #
1887
+ # @param [String] compartment_id The ID of the compartment in which to list buckets.
1888
+ # @param [Hash] opts the optional parameters
1889
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1890
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1891
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
1892
+ # @option opts [String] :page The page at which to start retrieving results.
1893
+ # @option opts [Integer] :limit The maximum number of items to return.
1894
+ # @return [Response] A Response object with data of type Array<{OCI::ObjectStorage::Models::WorkRequestSummary WorkRequestSummary}>
1895
+ def list_work_requests(compartment_id, opts = {})
1896
+ logger.debug 'Calling operation ObjectStorageClient#list_work_requests.' if logger
1897
+
1898
+ raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?
1899
+
1900
+ path = '/workRequests'
1901
+ operation_signing_strategy = :standard
1902
+
1903
+ # rubocop:disable Style/NegatedIf
1904
+ # Query Params
1905
+ query_params = {}
1906
+ query_params[:compartmentId] = compartment_id
1907
+ query_params[:page] = opts[:page] if opts[:page]
1908
+ query_params[:limit] = opts[:limit] if opts[:limit]
1909
+
1910
+ # Header Params
1911
+ header_params = {}
1912
+ header_params[:accept] = 'application/json'
1913
+ header_params[:'content-type'] = 'application/json'
1914
+ header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
1915
+ # rubocop:enable Style/NegatedIf
1916
+
1917
+ post_body = nil
1918
+
1919
+ # rubocop:disable Metrics/BlockLength
1920
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#list_work_requests') do
1921
+ @api_client.call_api(
1922
+ :GET,
1923
+ path,
1924
+ endpoint,
1925
+ header_params: header_params,
1926
+ query_params: query_params,
1927
+ operation_signing_strategy: operation_signing_strategy,
1928
+ body: post_body,
1929
+ return_type: 'Array<OCI::ObjectStorage::Models::WorkRequestSummary>'
1930
+ )
1931
+ end
1932
+ # rubocop:enable Metrics/BlockLength
1933
+ end
1934
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1935
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1936
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1937
+
1938
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1939
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1940
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1941
+
1942
+
1943
+ # Creates a new object or overwrites an existing one.
1488
1944
  #
1489
1945
  # @param [String] namespace_name The top-level namespace used for the request.
1490
1946
  # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
@@ -1501,7 +1957,7 @@ module OCI
1501
1957
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
1502
1958
  # For uploading a part, this is the entity tag of the target part.
1503
1959
  #
1504
- # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
1960
+ # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists.
1505
1961
  # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
1506
1962
  #
1507
1963
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -1577,6 +2033,75 @@ module OCI
1577
2033
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1578
2034
 
1579
2035
 
2036
+ # Creates or replaces the object lifecycle policy for the bucket.
2037
+ #
2038
+ # @param [String] namespace_name The top-level namespace used for the request.
2039
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
2040
+ # Example: `my-new-bucket1`
2041
+ #
2042
+ # @param [OCI::ObjectStorage::Models::PutObjectLifecyclePolicyDetails] put_object_lifecycle_policy_details The lifecycle policy to apply to the bucket.
2043
+ # @param [Hash] opts the optional parameters
2044
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
2045
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
2046
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
2047
+ # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
2048
+ # For uploading a part, this is the entity tag of the target part.
2049
+ #
2050
+ # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists.
2051
+ # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
2052
+ #
2053
+ # @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::ObjectLifecyclePolicy ObjectLifecyclePolicy}
2054
+ def put_object_lifecycle_policy(namespace_name, bucket_name, put_object_lifecycle_policy_details, opts = {})
2055
+ logger.debug 'Calling operation ObjectStorageClient#put_object_lifecycle_policy.' if logger
2056
+
2057
+ raise "Missing the required parameter 'namespace_name' when calling put_object_lifecycle_policy." if namespace_name.nil?
2058
+ raise "Missing the required parameter 'bucket_name' when calling put_object_lifecycle_policy." if bucket_name.nil?
2059
+ raise "Missing the required parameter 'put_object_lifecycle_policy_details' when calling put_object_lifecycle_policy." if put_object_lifecycle_policy_details.nil?
2060
+ raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name)
2061
+ raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name)
2062
+
2063
+ path = '/n/{namespaceName}/b/{bucketName}/l'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
2064
+ operation_signing_strategy = :standard
2065
+
2066
+ # rubocop:disable Style/NegatedIf
2067
+ # Query Params
2068
+ query_params = {}
2069
+
2070
+ # Header Params
2071
+ header_params = {}
2072
+ header_params[:accept] = 'application/json'
2073
+ header_params[:'content-type'] = 'application/json'
2074
+ header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id]
2075
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2076
+ header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
2077
+ # rubocop:enable Style/NegatedIf
2078
+
2079
+ post_body = @api_client.object_to_http_body(put_object_lifecycle_policy_details)
2080
+
2081
+ # rubocop:disable Metrics/BlockLength
2082
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#put_object_lifecycle_policy') do
2083
+ @api_client.call_api(
2084
+ :PUT,
2085
+ path,
2086
+ endpoint,
2087
+ header_params: header_params,
2088
+ query_params: query_params,
2089
+ operation_signing_strategy: operation_signing_strategy,
2090
+ body: post_body,
2091
+ return_type: 'OCI::ObjectStorage::Models::ObjectLifecyclePolicy'
2092
+ )
2093
+ end
2094
+ # rubocop:enable Metrics/BlockLength
2095
+ end
2096
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2097
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
2098
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
2099
+
2100
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2101
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
2102
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
2103
+
2104
+
1580
2105
  # Rename an object from source key to target key in the given namespace.
1581
2106
  #
1582
2107
  # @param [String] namespace_name The top-level namespace used for the request.
@@ -1637,8 +2162,8 @@ module OCI
1637
2162
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1638
2163
 
1639
2164
 
1640
- # Restore one or more objects specified by objectName parameter.
1641
- # By default object will be restored for 24 hours.Duration can be configured using hours parameter.
2165
+ # Restore one or more objects specified by the objectName parameter.
2166
+ # By default objects will be restored for 24 hours. Duration can be configured using the hours parameter.
1642
2167
  #
1643
2168
  # @param [String] namespace_name The top-level namespace used for the request.
1644
2169
  # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
@@ -1822,7 +2347,7 @@ module OCI
1822
2347
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1823
2348
 
1824
2349
 
1825
- # Uploads a single part of a multipart upload. See [Special Instructions for Object Storage PUT](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/signingrequests.htm#ObjectStoragePut) for request signature requirements.
2350
+ # Uploads a single part of a multipart upload.
1826
2351
  #
1827
2352
  # @param [String] namespace_name The top-level namespace used for the request.
1828
2353
  # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
@@ -1842,7 +2367,7 @@ module OCI
1842
2367
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
1843
2368
  # For uploading a part, this is the entity tag of the target part.
1844
2369
  #
1845
- # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
2370
+ # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists.
1846
2371
  # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
1847
2372
  #
1848
2373
  # @option opts [String] :expect 100-continue (default to 100-continue)