oci-cli 3.65.1__py3-none-any.whl → 3.66.0__py3-none-any.whl

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 (52) hide show
  1. oci_cli/bin/email.psm1 +23 -11
  2. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/delete.txt +5 -0
  3. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database-backup/list.txt +18 -0
  4. oci_cli/help_text_producer/data_files/text/cmdref/db/system/list-db-system-storage-performances.txt +3 -3
  5. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error/{list.txt → list-errors.txt} +5 -5
  6. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error.txt +1 -1
  7. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/{work-request-log-entry/list-work-request-logs.txt → work-request-log/list.txt} +5 -5
  8. oci_cli/help_text_producer/data_files/text/cmdref/{organizations/work-request-log-entry.txt → delegate-access-control/work-request/work-request-log.txt} +2 -2
  9. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request.txt +3 -3
  10. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +3 -3
  11. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/add.txt +148 -0
  12. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/change-compartment.txt +4 -0
  13. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/delete.txt +4 -0
  14. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/remove.txt +138 -0
  15. oci_cli/help_text_producer/data_files/text/cmdref/email/domain/update.txt +4 -0
  16. oci_cli/help_text_producer/data_files/text/cmdref/email/domain.txt +4 -0
  17. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path/add.txt +150 -0
  18. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path/delete.txt +4 -0
  19. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path/remove.txt +140 -0
  20. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path/update.txt +4 -0
  21. oci_cli/help_text_producer/data_files/text/cmdref/email/email-return-path.txt +4 -0
  22. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/add.txt +151 -0
  23. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/change-compartment.txt +4 -0
  24. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/delete.txt +4 -0
  25. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/remove.txt +141 -0
  26. oci_cli/help_text_producer/data_files/text/cmdref/email/sender/update.txt +4 -0
  27. oci_cli/help_text_producer/data_files/text/cmdref/email/sender.txt +4 -0
  28. oci_cli/help_text_producer/data_files/text/cmdref/email.txt +12 -0
  29. oci_cli/help_text_producer/data_files/text/cmdref/fs/mount-target/create.txt +12 -5
  30. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-error/{list.txt → list-errors.txt} +5 -5
  31. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-error.txt +1 -1
  32. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-log-entry/{list-work-request-logs.txt → list-logs.txt} +5 -5
  33. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-log-entry.txt +1 -1
  34. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request.txt +2 -2
  35. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane.txt +2 -2
  36. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list.txt → list-errors.txt} +5 -5
  37. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
  38. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-log/list.txt +118 -0
  39. oci_cli/help_text_producer/data_files/text/cmdref/{delegate-access-control/work-request/work-request-log-entry.txt → organizations/work-request-log.txt} +3 -3
  40. oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +2 -2
  41. oci_cli/version.py +1 -1
  42. {oci_cli-3.65.1.dist-info → oci_cli-3.66.0.dist-info}/METADATA +2 -2
  43. {oci_cli-3.65.1.dist-info → oci_cli-3.66.0.dist-info}/RECORD +51 -45
  44. services/database/src/oci_cli_database/generated/database_cli.py +15 -3
  45. services/email/src/oci_cli_email/generated/email_cli.py +422 -8
  46. services/file_storage/src/oci_cli_file_storage/generated/filestorage_cli.py +5 -1
  47. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-log-entry/list.txt +0 -100
  48. {oci_cli-3.65.1.dist-info → oci_cli-3.66.0.dist-info}/LICENSE.txt +0 -0
  49. {oci_cli-3.65.1.dist-info → oci_cli-3.66.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  50. {oci_cli-3.65.1.dist-info → oci_cli-3.66.0.dist-info}/WHEEL +0 -0
  51. {oci_cli-3.65.1.dist-info → oci_cli-3.66.0.dist-info}/entry_points.txt +0 -0
  52. {oci_cli-3.65.1.dist-info → oci_cli-3.66.0.dist-info}/top_level.txt +0 -0
@@ -98,12 +98,220 @@ email_root_group.add_command(work_request_group)
98
98
  email_root_group.add_command(work_request_log_entry_collection_group)
99
99
 
100
100
 
101
+ @email_domain_group.command(name=cli_util.override('email.add_email_domain_lock.command_name', 'add'), help=u"""Adds a lock to a resource. \n[Command Reference](addEmailDomainLock)""")
102
+ @cli_util.option('--email-domain-id', required=True, help=u"""The [OCID] of this email domain.""")
103
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Lock type.""")
104
+ @cli_util.option('--compartment-id', help=u"""The lock compartment ID.""")
105
+ @cli_util.option('--related-resource-id', help=u"""The resource ID that is locking this resource. Indicates that deleting this resource removes the lock.""")
106
+ @cli_util.option('--message', help=u"""A message added by the lock creator. The message typically gives an indication of why the resource is locked.""")
107
+ @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
108
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "CREATING", "DELETING", "DELETED", "FAILED", "UPDATING"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
109
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
110
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
111
+ @json_skeleton_utils.get_cli_json_input_option({})
112
+ @cli_util.help_option
113
+ @click.pass_context
114
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'email', 'class': 'EmailDomain'})
115
+ @cli_util.wrap_exceptions
116
+ def add_email_domain_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_domain_id, type, compartment_id, related_resource_id, message, if_match):
117
+
118
+ if isinstance(email_domain_id, six.string_types) and len(email_domain_id.strip()) == 0:
119
+ raise click.UsageError('Parameter --email-domain-id cannot be whitespace or empty string')
120
+
121
+ kwargs = {}
122
+ if if_match is not None:
123
+ kwargs['if_match'] = if_match
124
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
125
+
126
+ _details = {}
127
+ _details['type'] = type
128
+
129
+ if compartment_id is not None:
130
+ _details['compartmentId'] = compartment_id
131
+
132
+ if related_resource_id is not None:
133
+ _details['relatedResourceId'] = related_resource_id
134
+
135
+ if message is not None:
136
+ _details['message'] = message
137
+
138
+ client = cli_util.build_client('email', 'email', ctx)
139
+ result = client.add_email_domain_lock(
140
+ email_domain_id=email_domain_id,
141
+ add_lock_details=_details,
142
+ **kwargs
143
+ )
144
+ if wait_for_state:
145
+
146
+ if hasattr(client, 'get_email_domain') and callable(getattr(client, 'get_email_domain')):
147
+ try:
148
+ wait_period_kwargs = {}
149
+ if max_wait_seconds is not None:
150
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
151
+ if wait_interval_seconds is not None:
152
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
153
+
154
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
155
+ result = oci.wait_until(client, client.get_email_domain(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
156
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
157
+ # If we fail, we should show an error, but we should still provide the information to the customer
158
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
159
+ cli_util.render_response(result, ctx)
160
+ sys.exit(2)
161
+ except Exception:
162
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
163
+ cli_util.render_response(result, ctx)
164
+ raise
165
+ else:
166
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
167
+ cli_util.render_response(result, ctx)
168
+
169
+
170
+ @email_return_path_group.command(name=cli_util.override('email.add_return_path_lock.command_name', 'add'), help=u"""Adds a lock to a resource. \n[Command Reference](addReturnPathLock)""")
171
+ @cli_util.option('--email-return-path-id', required=True, help=u"""The [OCID] of this email return path.""")
172
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Lock type.""")
173
+ @cli_util.option('--compartment-id', help=u"""The lock compartment ID.""")
174
+ @cli_util.option('--related-resource-id', help=u"""The resource ID that is locking this resource. Indicates that deleting this resource removes the lock.""")
175
+ @cli_util.option('--message', help=u"""A message added by the lock creator. The message typically gives an indication of why the resource is locked.""")
176
+ @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
177
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "CREATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "UPDATING"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
178
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
179
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
180
+ @json_skeleton_utils.get_cli_json_input_option({})
181
+ @cli_util.help_option
182
+ @click.pass_context
183
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'email', 'class': 'EmailReturnPath'})
184
+ @cli_util.wrap_exceptions
185
+ def add_return_path_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_return_path_id, type, compartment_id, related_resource_id, message, if_match):
186
+
187
+ if isinstance(email_return_path_id, six.string_types) and len(email_return_path_id.strip()) == 0:
188
+ raise click.UsageError('Parameter --email-return-path-id cannot be whitespace or empty string')
189
+
190
+ kwargs = {}
191
+ if if_match is not None:
192
+ kwargs['if_match'] = if_match
193
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
194
+
195
+ _details = {}
196
+ _details['type'] = type
197
+
198
+ if compartment_id is not None:
199
+ _details['compartmentId'] = compartment_id
200
+
201
+ if related_resource_id is not None:
202
+ _details['relatedResourceId'] = related_resource_id
203
+
204
+ if message is not None:
205
+ _details['message'] = message
206
+
207
+ client = cli_util.build_client('email', 'email', ctx)
208
+ result = client.add_return_path_lock(
209
+ email_return_path_id=email_return_path_id,
210
+ add_lock_details=_details,
211
+ **kwargs
212
+ )
213
+ if wait_for_state:
214
+
215
+ if hasattr(client, 'get_email_return_path') and callable(getattr(client, 'get_email_return_path')):
216
+ try:
217
+ wait_period_kwargs = {}
218
+ if max_wait_seconds is not None:
219
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
220
+ if wait_interval_seconds is not None:
221
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
222
+
223
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
224
+ result = oci.wait_until(client, client.get_email_return_path(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
225
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
226
+ # If we fail, we should show an error, but we should still provide the information to the customer
227
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
228
+ cli_util.render_response(result, ctx)
229
+ sys.exit(2)
230
+ except Exception:
231
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
232
+ cli_util.render_response(result, ctx)
233
+ raise
234
+ else:
235
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
236
+ cli_util.render_response(result, ctx)
237
+
238
+
239
+ @sender_group.command(name=cli_util.override('email.add_sender_lock.command_name', 'add'), help=u"""Adds a lock to a resource. \n[Command Reference](addSenderLock)""")
240
+ @cli_util.option('--sender-id', required=True, help=u"""The unique OCID of the sender.""")
241
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Lock type.""")
242
+ @cli_util.option('--compartment-id', help=u"""The lock compartment ID.""")
243
+ @cli_util.option('--related-resource-id', help=u"""The resource ID that is locking this resource. Indicates that deleting this resource removes the lock.""")
244
+ @cli_util.option('--message', help=u"""A message added by the lock creator. The message typically gives an indication of why the resource is locked.""")
245
+ @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
246
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "NEEDS_ATTENTION", "INACTIVE", "FAILED", "DELETING", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
247
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
248
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
249
+ @json_skeleton_utils.get_cli_json_input_option({})
250
+ @cli_util.help_option
251
+ @click.pass_context
252
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'email', 'class': 'Sender'})
253
+ @cli_util.wrap_exceptions
254
+ def add_sender_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, sender_id, type, compartment_id, related_resource_id, message, if_match):
255
+
256
+ if isinstance(sender_id, six.string_types) and len(sender_id.strip()) == 0:
257
+ raise click.UsageError('Parameter --sender-id cannot be whitespace or empty string')
258
+
259
+ kwargs = {}
260
+ if if_match is not None:
261
+ kwargs['if_match'] = if_match
262
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
263
+
264
+ _details = {}
265
+ _details['type'] = type
266
+
267
+ if compartment_id is not None:
268
+ _details['compartmentId'] = compartment_id
269
+
270
+ if related_resource_id is not None:
271
+ _details['relatedResourceId'] = related_resource_id
272
+
273
+ if message is not None:
274
+ _details['message'] = message
275
+
276
+ client = cli_util.build_client('email', 'email', ctx)
277
+ result = client.add_sender_lock(
278
+ sender_id=sender_id,
279
+ add_lock_details=_details,
280
+ **kwargs
281
+ )
282
+ if wait_for_state:
283
+
284
+ if hasattr(client, 'get_sender') and callable(getattr(client, 'get_sender')):
285
+ try:
286
+ wait_period_kwargs = {}
287
+ if max_wait_seconds is not None:
288
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
289
+ if wait_interval_seconds is not None:
290
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
291
+
292
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
293
+ result = oci.wait_until(client, client.get_sender(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
294
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
295
+ # If we fail, we should show an error, but we should still provide the information to the customer
296
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
297
+ cli_util.render_response(result, ctx)
298
+ sys.exit(2)
299
+ except Exception:
300
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
301
+ cli_util.render_response(result, ctx)
302
+ raise
303
+ else:
304
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
305
+ cli_util.render_response(result, ctx)
306
+
307
+
101
308
  @email_domain_group.command(name=cli_util.override('email.change_email_domain_compartment.command_name', 'change-compartment'), help=u"""Moves an email domain into a different compartment. When provided, If-Match is checked against ETag value of the resource. For information about moving resources between compartments, see [Moving Resources to a Different Compartment].
102
309
 
103
310
  **Note:** All DKIM objects associated with this email domain will also be moved into the provided compartment. \n[Command Reference](changeEmailDomainCompartment)""")
104
311
  @cli_util.option('--email-domain-id', required=True, help=u"""The [OCID] of this email domain.""")
105
312
  @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to move the specified resource to.""")
106
313
  @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
314
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
107
315
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
108
316
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
109
317
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
@@ -112,7 +320,7 @@ email_root_group.add_command(work_request_log_entry_collection_group)
112
320
  @click.pass_context
113
321
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
114
322
  @cli_util.wrap_exceptions
115
- def change_email_domain_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_domain_id, compartment_id, if_match):
323
+ def change_email_domain_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_domain_id, compartment_id, if_match, is_lock_override):
116
324
 
117
325
  if isinstance(email_domain_id, six.string_types) and len(email_domain_id.strip()) == 0:
118
326
  raise click.UsageError('Parameter --email-domain-id cannot be whitespace or empty string')
@@ -120,6 +328,8 @@ def change_email_domain_compartment(ctx, from_json, wait_for_state, max_wait_sec
120
328
  kwargs = {}
121
329
  if if_match is not None:
122
330
  kwargs['if_match'] = if_match
331
+ if is_lock_override is not None:
332
+ kwargs['is_lock_override'] = is_lock_override
123
333
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
124
334
 
125
335
  _details = {}
@@ -165,12 +375,13 @@ def change_email_domain_compartment(ctx, from_json, wait_for_state, max_wait_sec
165
375
  @cli_util.option('--sender-id', required=True, help=u"""The unique OCID of the sender.""")
166
376
  @cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment into which the sender should be moved.""")
167
377
  @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
378
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
168
379
  @json_skeleton_utils.get_cli_json_input_option({})
169
380
  @cli_util.help_option
170
381
  @click.pass_context
171
382
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
172
383
  @cli_util.wrap_exceptions
173
- def change_sender_compartment(ctx, from_json, sender_id, compartment_id, if_match):
384
+ def change_sender_compartment(ctx, from_json, sender_id, compartment_id, if_match, is_lock_override):
174
385
 
175
386
  if isinstance(sender_id, six.string_types) and len(sender_id.strip()) == 0:
176
387
  raise click.UsageError('Parameter --sender-id cannot be whitespace or empty string')
@@ -178,6 +389,8 @@ def change_sender_compartment(ctx, from_json, sender_id, compartment_id, if_matc
178
389
  kwargs = {}
179
390
  if if_match is not None:
180
391
  kwargs['if_match'] = if_match
392
+ if is_lock_override is not None:
393
+ kwargs['is_lock_override'] = is_lock_override
181
394
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
182
395
 
183
396
  _details = {}
@@ -568,6 +781,7 @@ def delete_dkim(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
568
781
  @email_domain_group.command(name=cli_util.override('email.delete_email_domain.command_name', 'delete'), help=u"""Deletes an email domain. \n[Command Reference](deleteEmailDomain)""")
569
782
  @cli_util.option('--email-domain-id', required=True, help=u"""The [OCID] of this email domain.""")
570
783
  @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
784
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
571
785
  @cli_util.confirm_delete_option
572
786
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
573
787
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
@@ -577,7 +791,7 @@ def delete_dkim(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_
577
791
  @click.pass_context
578
792
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
579
793
  @cli_util.wrap_exceptions
580
- def delete_email_domain(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_domain_id, if_match):
794
+ def delete_email_domain(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_domain_id, if_match, is_lock_override):
581
795
 
582
796
  if isinstance(email_domain_id, six.string_types) and len(email_domain_id.strip()) == 0:
583
797
  raise click.UsageError('Parameter --email-domain-id cannot be whitespace or empty string')
@@ -585,6 +799,8 @@ def delete_email_domain(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
585
799
  kwargs = {}
586
800
  if if_match is not None:
587
801
  kwargs['if_match'] = if_match
802
+ if is_lock_override is not None:
803
+ kwargs['is_lock_override'] = is_lock_override
588
804
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
589
805
  client = cli_util.build_client('email', 'email', ctx)
590
806
  result = client.delete_email_domain(
@@ -624,6 +840,7 @@ def delete_email_domain(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
624
840
  @email_return_path_group.command(name=cli_util.override('email.delete_email_return_path.command_name', 'delete'), help=u"""Deletes an email return path. \n[Command Reference](deleteEmailReturnPath)""")
625
841
  @cli_util.option('--email-return-path-id', required=True, help=u"""The [OCID] of this email return path.""")
626
842
  @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
843
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
627
844
  @cli_util.confirm_delete_option
628
845
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
629
846
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
@@ -633,7 +850,7 @@ def delete_email_domain(ctx, from_json, wait_for_state, max_wait_seconds, wait_i
633
850
  @click.pass_context
634
851
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
635
852
  @cli_util.wrap_exceptions
636
- def delete_email_return_path(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_return_path_id, if_match):
853
+ def delete_email_return_path(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_return_path_id, if_match, is_lock_override):
637
854
 
638
855
  if isinstance(email_return_path_id, six.string_types) and len(email_return_path_id.strip()) == 0:
639
856
  raise click.UsageError('Parameter --email-return-path-id cannot be whitespace or empty string')
@@ -641,6 +858,8 @@ def delete_email_return_path(ctx, from_json, wait_for_state, max_wait_seconds, w
641
858
  kwargs = {}
642
859
  if if_match is not None:
643
860
  kwargs['if_match'] = if_match
861
+ if is_lock_override is not None:
862
+ kwargs['is_lock_override'] = is_lock_override
644
863
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
645
864
  client = cli_util.build_client('email', 'email', ctx)
646
865
  result = client.delete_email_return_path(
@@ -680,6 +899,7 @@ def delete_email_return_path(ctx, from_json, wait_for_state, max_wait_seconds, w
680
899
  @sender_group.command(name=cli_util.override('email.delete_sender.command_name', 'delete'), help=u"""Deletes an approved sender for a tenancy in a given compartment for a provided `senderId`. \n[Command Reference](deleteSender)""")
681
900
  @cli_util.option('--sender-id', required=True, help=u"""The unique OCID of the sender.""")
682
901
  @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
902
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
683
903
  @cli_util.confirm_delete_option
684
904
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "NEEDS_ATTENTION", "INACTIVE", "FAILED", "DELETING", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
685
905
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
@@ -689,7 +909,7 @@ def delete_email_return_path(ctx, from_json, wait_for_state, max_wait_seconds, w
689
909
  @click.pass_context
690
910
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
691
911
  @cli_util.wrap_exceptions
692
- def delete_sender(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, sender_id, if_match):
912
+ def delete_sender(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, sender_id, if_match, is_lock_override):
693
913
 
694
914
  if isinstance(sender_id, six.string_types) and len(sender_id.strip()) == 0:
695
915
  raise click.UsageError('Parameter --sender-id cannot be whitespace or empty string')
@@ -697,6 +917,8 @@ def delete_sender(ctx, from_json, wait_for_state, max_wait_seconds, wait_interva
697
917
  kwargs = {}
698
918
  if if_match is not None:
699
919
  kwargs['if_match'] = if_match
920
+ if is_lock_override is not None:
921
+ kwargs['is_lock_override'] = is_lock_override
700
922
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
701
923
  client = cli_util.build_client('email', 'email', ctx)
702
924
  result = client.delete_sender(
@@ -1401,6 +1623,189 @@ def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, wor
1401
1623
  cli_util.render_response(result, ctx)
1402
1624
 
1403
1625
 
1626
+ @email_domain_group.command(name=cli_util.override('email.remove_email_domain_lock.command_name', 'remove'), help=u"""Remove a lock to a resource. \n[Command Reference](removeEmailDomainLock)""")
1627
+ @cli_util.option('--email-domain-id', required=True, help=u"""The [OCID] of this email domain.""")
1628
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Lock type.""")
1629
+ @cli_util.option('--compartment-id', help=u"""The lock compartment ID.""")
1630
+ @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1631
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "CREATING", "DELETING", "DELETED", "FAILED", "UPDATING"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1632
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
1633
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
1634
+ @json_skeleton_utils.get_cli_json_input_option({})
1635
+ @cli_util.help_option
1636
+ @click.pass_context
1637
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'email', 'class': 'EmailDomain'})
1638
+ @cli_util.wrap_exceptions
1639
+ def remove_email_domain_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_domain_id, type, compartment_id, if_match):
1640
+
1641
+ if isinstance(email_domain_id, six.string_types) and len(email_domain_id.strip()) == 0:
1642
+ raise click.UsageError('Parameter --email-domain-id cannot be whitespace or empty string')
1643
+
1644
+ kwargs = {}
1645
+ if if_match is not None:
1646
+ kwargs['if_match'] = if_match
1647
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1648
+
1649
+ _details = {}
1650
+ _details['type'] = type
1651
+
1652
+ if compartment_id is not None:
1653
+ _details['compartmentId'] = compartment_id
1654
+
1655
+ client = cli_util.build_client('email', 'email', ctx)
1656
+ result = client.remove_email_domain_lock(
1657
+ email_domain_id=email_domain_id,
1658
+ remove_lock_details=_details,
1659
+ **kwargs
1660
+ )
1661
+ if wait_for_state:
1662
+
1663
+ if hasattr(client, 'get_email_domain') and callable(getattr(client, 'get_email_domain')):
1664
+ try:
1665
+ wait_period_kwargs = {}
1666
+ if max_wait_seconds is not None:
1667
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1668
+ if wait_interval_seconds is not None:
1669
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1670
+
1671
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1672
+ result = oci.wait_until(client, client.get_email_domain(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
1673
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1674
+ # If we fail, we should show an error, but we should still provide the information to the customer
1675
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
1676
+ cli_util.render_response(result, ctx)
1677
+ sys.exit(2)
1678
+ except Exception:
1679
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1680
+ cli_util.render_response(result, ctx)
1681
+ raise
1682
+ else:
1683
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1684
+ cli_util.render_response(result, ctx)
1685
+
1686
+
1687
+ @email_return_path_group.command(name=cli_util.override('email.remove_return_path_lock.command_name', 'remove'), help=u"""Remove a lock to a resource. \n[Command Reference](removeReturnPathLock)""")
1688
+ @cli_util.option('--email-return-path-id', required=True, help=u"""The [OCID] of this email return path.""")
1689
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Lock type.""")
1690
+ @cli_util.option('--compartment-id', help=u"""The lock compartment ID.""")
1691
+ @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1692
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "CREATING", "DELETING", "DELETED", "FAILED", "NEEDS_ATTENTION", "UPDATING"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1693
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
1694
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
1695
+ @json_skeleton_utils.get_cli_json_input_option({})
1696
+ @cli_util.help_option
1697
+ @click.pass_context
1698
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'email', 'class': 'EmailReturnPath'})
1699
+ @cli_util.wrap_exceptions
1700
+ def remove_return_path_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, email_return_path_id, type, compartment_id, if_match):
1701
+
1702
+ if isinstance(email_return_path_id, six.string_types) and len(email_return_path_id.strip()) == 0:
1703
+ raise click.UsageError('Parameter --email-return-path-id cannot be whitespace or empty string')
1704
+
1705
+ kwargs = {}
1706
+ if if_match is not None:
1707
+ kwargs['if_match'] = if_match
1708
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1709
+
1710
+ _details = {}
1711
+ _details['type'] = type
1712
+
1713
+ if compartment_id is not None:
1714
+ _details['compartmentId'] = compartment_id
1715
+
1716
+ client = cli_util.build_client('email', 'email', ctx)
1717
+ result = client.remove_return_path_lock(
1718
+ email_return_path_id=email_return_path_id,
1719
+ remove_lock_details=_details,
1720
+ **kwargs
1721
+ )
1722
+ if wait_for_state:
1723
+
1724
+ if hasattr(client, 'get_email_return_path') and callable(getattr(client, 'get_email_return_path')):
1725
+ try:
1726
+ wait_period_kwargs = {}
1727
+ if max_wait_seconds is not None:
1728
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1729
+ if wait_interval_seconds is not None:
1730
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1731
+
1732
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1733
+ result = oci.wait_until(client, client.get_email_return_path(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
1734
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1735
+ # If we fail, we should show an error, but we should still provide the information to the customer
1736
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
1737
+ cli_util.render_response(result, ctx)
1738
+ sys.exit(2)
1739
+ except Exception:
1740
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1741
+ cli_util.render_response(result, ctx)
1742
+ raise
1743
+ else:
1744
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1745
+ cli_util.render_response(result, ctx)
1746
+
1747
+
1748
+ @sender_group.command(name=cli_util.override('email.remove_sender_lock.command_name', 'remove'), help=u"""Remove a lock to a resource. \n[Command Reference](removeSenderLock)""")
1749
+ @cli_util.option('--sender-id', required=True, help=u"""The unique OCID of the sender.""")
1750
+ @cli_util.option('--type', required=True, type=custom_types.CliCaseInsensitiveChoice(["FULL", "DELETE"]), help=u"""Lock type.""")
1751
+ @cli_util.option('--compartment-id', help=u"""The lock compartment ID.""")
1752
+ @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1753
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "NEEDS_ATTENTION", "INACTIVE", "FAILED", "DELETING", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1754
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
1755
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
1756
+ @json_skeleton_utils.get_cli_json_input_option({})
1757
+ @cli_util.help_option
1758
+ @click.pass_context
1759
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'email', 'class': 'Sender'})
1760
+ @cli_util.wrap_exceptions
1761
+ def remove_sender_lock(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, sender_id, type, compartment_id, if_match):
1762
+
1763
+ if isinstance(sender_id, six.string_types) and len(sender_id.strip()) == 0:
1764
+ raise click.UsageError('Parameter --sender-id cannot be whitespace or empty string')
1765
+
1766
+ kwargs = {}
1767
+ if if_match is not None:
1768
+ kwargs['if_match'] = if_match
1769
+ kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1770
+
1771
+ _details = {}
1772
+ _details['type'] = type
1773
+
1774
+ if compartment_id is not None:
1775
+ _details['compartmentId'] = compartment_id
1776
+
1777
+ client = cli_util.build_client('email', 'email', ctx)
1778
+ result = client.remove_sender_lock(
1779
+ sender_id=sender_id,
1780
+ remove_lock_details=_details,
1781
+ **kwargs
1782
+ )
1783
+ if wait_for_state:
1784
+
1785
+ if hasattr(client, 'get_sender') and callable(getattr(client, 'get_sender')):
1786
+ try:
1787
+ wait_period_kwargs = {}
1788
+ if max_wait_seconds is not None:
1789
+ wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1790
+ if wait_interval_seconds is not None:
1791
+ wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1792
+
1793
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1794
+ result = oci.wait_until(client, client.get_sender(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
1795
+ except oci.exceptions.MaximumWaitTimeExceeded as e:
1796
+ # If we fail, we should show an error, but we should still provide the information to the customer
1797
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
1798
+ cli_util.render_response(result, ctx)
1799
+ sys.exit(2)
1800
+ except Exception:
1801
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1802
+ cli_util.render_response(result, ctx)
1803
+ raise
1804
+ else:
1805
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1806
+ cli_util.render_response(result, ctx)
1807
+
1808
+
1404
1809
  @dkim_group.command(name=cli_util.override('email.update_dkim.command_name', 'update'), help=u"""Modifies a DKIM. \n[Command Reference](updateDkim)""")
1405
1810
  @cli_util.option('--dkim-id', required=True, help=u"""The [OCID] of this DKIM.""")
1406
1811
  @cli_util.option('--description', help=u"""A string that describes the details about the DKIM. It does not have to be unique, and you can change it. Avoid entering confidential information.""")
@@ -1492,6 +1897,7 @@ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMP
1492
1897
 
1493
1898
  Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1494
1899
  @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1900
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
1495
1901
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
1496
1902
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1497
1903
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
@@ -1501,7 +1907,7 @@ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_comp
1501
1907
  @click.pass_context
1502
1908
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'email', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'email', 'class': 'dict(str, dict(str, object))'}})
1503
1909
  @cli_util.wrap_exceptions
1504
- def update_email_domain(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, email_domain_id, domain_verification_id, description, freeform_tags, defined_tags, if_match):
1910
+ def update_email_domain(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, email_domain_id, domain_verification_id, description, freeform_tags, defined_tags, if_match, is_lock_override):
1505
1911
 
1506
1912
  if isinstance(email_domain_id, six.string_types) and len(email_domain_id.strip()) == 0:
1507
1913
  raise click.UsageError('Parameter --email-domain-id cannot be whitespace or empty string')
@@ -1513,6 +1919,8 @@ def update_email_domain(ctx, from_json, force, wait_for_state, max_wait_seconds,
1513
1919
  kwargs = {}
1514
1920
  if if_match is not None:
1515
1921
  kwargs['if_match'] = if_match
1922
+ if is_lock_override is not None:
1923
+ kwargs['is_lock_override'] = is_lock_override
1516
1924
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1517
1925
 
1518
1926
  _details = {}
@@ -1575,6 +1983,7 @@ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMP
1575
1983
 
1576
1984
  Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1577
1985
  @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
1986
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
1578
1987
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
1579
1988
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1580
1989
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
@@ -1584,7 +1993,7 @@ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_comp
1584
1993
  @click.pass_context
1585
1994
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'email', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'email', 'class': 'dict(str, dict(str, object))'}})
1586
1995
  @cli_util.wrap_exceptions
1587
- def update_email_return_path(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, email_return_path_id, description, freeform_tags, defined_tags, if_match):
1996
+ def update_email_return_path(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, email_return_path_id, description, freeform_tags, defined_tags, if_match, is_lock_override):
1588
1997
 
1589
1998
  if isinstance(email_return_path_id, six.string_types) and len(email_return_path_id.strip()) == 0:
1590
1999
  raise click.UsageError('Parameter --email-return-path-id cannot be whitespace or empty string')
@@ -1596,6 +2005,8 @@ def update_email_return_path(ctx, from_json, force, wait_for_state, max_wait_sec
1596
2005
  kwargs = {}
1597
2006
  if if_match is not None:
1598
2007
  kwargs['if_match'] = if_match
2008
+ if is_lock_override is not None:
2009
+ kwargs['is_lock_override'] = is_lock_override
1599
2010
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1600
2011
 
1601
2012
  _details = {}
@@ -1654,6 +2065,7 @@ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMP
1654
2065
 
1655
2066
  Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
1656
2067
  @cli_util.option('--if-match', help=u"""Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match` parameter to the value of the etag from a previous get, create, or update response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
2068
+ @cli_util.option('--is-lock-override', type=click.BOOL, help=u"""Whether to override locks (if any exist).""")
1657
2069
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
1658
2070
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "NEEDS_ATTENTION", "INACTIVE", "FAILED", "DELETING", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
1659
2071
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
@@ -1663,7 +2075,7 @@ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_comp
1663
2075
  @click.pass_context
1664
2076
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'email', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'email', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'email', 'class': 'Sender'})
1665
2077
  @cli_util.wrap_exceptions
1666
- def update_sender(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, sender_id, freeform_tags, defined_tags, if_match):
2078
+ def update_sender(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, sender_id, freeform_tags, defined_tags, if_match, is_lock_override):
1667
2079
 
1668
2080
  if isinstance(sender_id, six.string_types) and len(sender_id.strip()) == 0:
1669
2081
  raise click.UsageError('Parameter --sender-id cannot be whitespace or empty string')
@@ -1675,6 +2087,8 @@ def update_sender(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_
1675
2087
  kwargs = {}
1676
2088
  if if_match is not None:
1677
2089
  kwargs['if_match'] = if_match
2090
+ if is_lock_override is not None:
2091
+ kwargs['is_lock_override'] = is_lock_override
1678
2092
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
1679
2093
 
1680
2094
  _details = {}