Class: OCI::Email::EmailClient
- Inherits:
-
Object
- Object
- OCI::Email::EmailClient
- Defined in:
- lib/oci/email/email_client.rb
Overview
Use the Email Delivery API to do the necessary set up to send high-volume and application-generated emails through the OCI Email Delivery service. For more information, see Overview of the Email Delivery Service.
Note: Write actions (POST, UPDATE, DELETE) may take several minutes to propagate and be reflected by the API. If a subsequent read request fails to reflect your changes, wait a few minutes and try again.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#change_email_domain_compartment(email_domain_id, change_email_domain_compartment_details, opts = {}) ⇒ Response
Moves an email domain into a different compartment.
-
#change_sender_compartment(sender_id, change_sender_compartment_details, opts = {}) ⇒ Response
Moves a sender into a different compartment.
-
#create_dkim(create_dkim_details, opts = {}) ⇒ Response
Creates a new DKIM for an email domain.
-
#create_email_domain(create_email_domain_details, opts = {}) ⇒ Response
Creates a new email domain.
-
#create_email_return_path(create_email_return_path_details, opts = {}) ⇒ Response
Creates a new email return path.
-
#create_sender(create_sender_details, opts = {}) ⇒ Response
Creates a sender for a tenancy in a given compartment.
-
#create_suppression(create_suppression_details, opts = {}) ⇒ Response
Adds recipient email addresses to the suppression list for a tenancy.
-
#delete_dkim(dkim_id, opts = {}) ⇒ Response
Deletes a DKIM.
-
#delete_email_domain(email_domain_id, opts = {}) ⇒ Response
Deletes an email domain.
-
#delete_email_return_path(email_return_path_id, opts = {}) ⇒ Response
Deletes an email return path.
-
#delete_sender(sender_id, opts = {}) ⇒ Response
Deletes an approved sender for a tenancy in a given compartment for a provided
senderId
. -
#delete_suppression(suppression_id, opts = {}) ⇒ Response
Removes a suppressed recipient email address from the suppression list for a tenancy in a given compartment for a provided
suppressionId
. -
#get_dkim(dkim_id, opts = {}) ⇒ Response
Retrieves the specified DKIM.
-
#get_email_configuration(compartment_id, opts = {}) ⇒ Response
Returns email configuration associated with the specified compartment.
-
#get_email_domain(email_domain_id, opts = {}) ⇒ Response
Retrieves the specified email domain.
-
#get_email_return_path(email_return_path_id, opts = {}) ⇒ Response
Retrieves the specified email return path.
-
#get_sender(sender_id, opts = {}) ⇒ Response
Gets an approved sender for a given
senderId
. -
#get_suppression(suppression_id, opts = {}) ⇒ Response
Gets the details of a suppressed recipient email address for a given
suppressionId
. -
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets the status of the work request with the given ID.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ EmailClient
constructor
Creates a new EmailClient.
-
#list_dkims(email_domain_id, opts = {}) ⇒ Response
Lists DKIMs for an email domain.
-
#list_email_domains(compartment_id, opts = {}) ⇒ Response
Lists email domains in the specified compartment.
-
#list_email_return_paths(opts = {}) ⇒ Response
Lists email return paths in the specified compartment or emaildomain.
-
#list_senders(compartment_id, opts = {}) ⇒ Response
Gets a collection of approved sender email addresses and sender IDs.
-
#list_suppressions(compartment_id, opts = {}) ⇒ Response
Gets a list of suppressed recipient email addresses for a user.
-
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Return a (paginated) list of errors for a given work request.
-
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Return a (paginated) list of logs for a given work request.
-
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Lists the work requests in a compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#update_dkim(dkim_id, update_dkim_details, opts = {}) ⇒ Response
Modifies a DKIM.
-
#update_email_domain(email_domain_id, update_email_domain_details, opts = {}) ⇒ Response
Modifies an email domain.
-
#update_email_return_path(email_return_path_id, update_email_return_path_details, opts = {}) ⇒ Response
Modifies an email return path.
-
#update_sender(sender_id, update_sender_details, opts = {}) ⇒ Response
Replaces the set of tags for a sender with the tags provided.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ EmailClient
Creates a new EmailClient. Notes: If a config is not specified, then the global OCI.config will be used.
This client is not thread-safe
Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/oci/email/email_client.rb', line 59 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/20170907' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "EmailClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
19 20 21 |
# File 'lib/oci/email/email_client.rb', line 19 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
23 24 25 |
# File 'lib/oci/email/email_client.rb', line 23 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
33 34 35 |
# File 'lib/oci/email/email_client.rb', line 33 def region @region end |
#retry_config ⇒ OCI::Retry::RetryConfig (readonly)
The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil
, which means that an operation will not perform any retries
29 30 31 |
# File 'lib/oci/email/email_client.rb', line 29 def retry_config @retry_config end |
Instance Method Details
#change_email_domain_compartment(email_domain_id, change_email_domain_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_email_domain_compartment API.
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.
Note: All DKIM objects associated with this email domain will also be moved into the provided compartment.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/oci/email/email_client.rb', line 132 def change_email_domain_compartment(email_domain_id, change_email_domain_compartment_details, opts = {}) logger.debug 'Calling operation EmailClient#change_email_domain_compartment.' if logger raise "Missing the required parameter 'email_domain_id' when calling change_email_domain_compartment." if email_domain_id.nil? raise "Missing the required parameter 'change_email_domain_compartment_details' when calling change_email_domain_compartment." if change_email_domain_compartment_details.nil? raise "Parameter value for 'email_domain_id' must not be blank" if OCI::Internal::Util.blank_string?(email_domain_id) path = '/emailDomains/{emailDomainId}/actions/changeCompartment'.sub('{emailDomainId}', email_domain_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_email_domain_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#change_email_domain_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_sender_compartment(sender_id, change_sender_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_sender_compartment API.
Moves a sender into a different compartment. When provided, If-Match is checked against ETag values of the resource.
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/oci/email/email_client.rb', line 194 def change_sender_compartment(sender_id, change_sender_compartment_details, opts = {}) logger.debug 'Calling operation EmailClient#change_sender_compartment.' if logger raise "Missing the required parameter 'sender_id' when calling change_sender_compartment." if sender_id.nil? raise "Missing the required parameter 'change_sender_compartment_details' when calling change_sender_compartment." if change_sender_compartment_details.nil? raise "Parameter value for 'sender_id' must not be blank" if OCI::Internal::Util.blank_string?(sender_id) path = '/senders/{senderId}/actions/changeCompartment'.sub('{senderId}', sender_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(change_sender_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#change_sender_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#create_dkim(create_dkim_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_dkim API.
Creates a new DKIM for an email domain. This DKIM signs all approved senders in the tenancy that are in this email domain. Best security practices indicate to periodically rotate the DKIM that is doing the signing. When a second DKIM is applied, all senders seamlessly pick up the new key without interruption in signing.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/oci/email/email_client.rb', line 260 def create_dkim(create_dkim_details, opts = {}) logger.debug 'Calling operation EmailClient#create_dkim.' if logger raise "Missing the required parameter 'create_dkim_details' when calling create_dkim." if create_dkim_details.nil? path = '/dkims' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_dkim_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#create_dkim') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::Dkim' ) end # rubocop:enable Metrics/BlockLength end |
#create_email_domain(create_email_domain_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_email_domain API.
Creates a new email domain. Avoid entering confidential information.
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/oci/email/email_client.rb', line 321 def create_email_domain(create_email_domain_details, opts = {}) logger.debug 'Calling operation EmailClient#create_email_domain.' if logger raise "Missing the required parameter 'create_email_domain_details' when calling create_email_domain." if create_email_domain_details.nil? path = '/emailDomains' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_email_domain_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#create_email_domain') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::EmailDomain' ) end # rubocop:enable Metrics/BlockLength end |
#create_email_return_path(create_email_return_path_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_email_return_path API.
Creates a new email return path. Avoid entering confidential information.
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
# File 'lib/oci/email/email_client.rb', line 382 def create_email_return_path(create_email_return_path_details, opts = {}) logger.debug 'Calling operation EmailClient#create_email_return_path.' if logger raise "Missing the required parameter 'create_email_return_path_details' when calling create_email_return_path." if create_email_return_path_details.nil? path = '/emailReturnPaths' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_email_return_path_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#create_email_return_path') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::EmailReturnPath' ) end # rubocop:enable Metrics/BlockLength end |
#create_sender(create_sender_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_sender API.
Creates a sender for a tenancy in a given compartment.
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'lib/oci/email/email_client.rb', line 437 def create_sender(create_sender_details, opts = {}) logger.debug 'Calling operation EmailClient#create_sender.' if logger raise "Missing the required parameter 'create_sender_details' when calling create_sender." if create_sender_details.nil? path = '/senders' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(create_sender_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#create_sender') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::Sender' ) end # rubocop:enable Metrics/BlockLength end |
#create_suppression(create_suppression_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_suppression API.
Adds recipient email addresses to the suppression list for a tenancy. Addresses added to the suppression list via the API are denoted as "MANUAL" in the reason
field. Note: All email addresses added to the suppression list are normalized to include only lowercase letters.
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/oci/email/email_client.rb', line 495 def create_suppression(create_suppression_details, opts = {}) logger.debug 'Calling operation EmailClient#create_suppression.' if logger raise "Missing the required parameter 'create_suppression_details' when calling create_suppression." if create_suppression_details.nil? path = '/suppressions' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(create_suppression_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#create_suppression') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::Suppression' ) end # rubocop:enable Metrics/BlockLength end |
#delete_dkim(dkim_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_dkim API.
Deletes a DKIM. If this key is currently the active key for the email domain, deleting the key will stop signing the domain's outgoing mail. DKIM keys are left in DELETING state for about a day to allow DKIM signatures on in-transit mail to be validated. Consider creating a new DKIM for this domain so the signing can be rotated to it instead of deletion.
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 |
# File 'lib/oci/email/email_client.rb', line 558 def delete_dkim(dkim_id, opts = {}) logger.debug 'Calling operation EmailClient#delete_dkim.' if logger raise "Missing the required parameter 'dkim_id' when calling delete_dkim." if dkim_id.nil? raise "Parameter value for 'dkim_id' must not be blank" if OCI::Internal::Util.blank_string?(dkim_id) path = '/dkims/{dkimId}'.sub('{dkimId}', dkim_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#delete_dkim') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_email_domain(email_domain_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_email_domain API.
Deletes an email domain.
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
# File 'lib/oci/email/email_client.rb', line 616 def delete_email_domain(email_domain_id, opts = {}) logger.debug 'Calling operation EmailClient#delete_email_domain.' if logger raise "Missing the required parameter 'email_domain_id' when calling delete_email_domain." if email_domain_id.nil? raise "Parameter value for 'email_domain_id' must not be blank" if OCI::Internal::Util.blank_string?(email_domain_id) path = '/emailDomains/{emailDomainId}'.sub('{emailDomainId}', email_domain_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#delete_email_domain') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_email_return_path(email_return_path_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_email_return_path API.
Deletes an email return path.
674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 |
# File 'lib/oci/email/email_client.rb', line 674 def delete_email_return_path(email_return_path_id, opts = {}) logger.debug 'Calling operation EmailClient#delete_email_return_path.' if logger raise "Missing the required parameter 'email_return_path_id' when calling delete_email_return_path." if email_return_path_id.nil? raise "Parameter value for 'email_return_path_id' must not be blank" if OCI::Internal::Util.blank_string?(email_return_path_id) path = '/emailReturnPaths/{emailReturnPathId}'.sub('{emailReturnPathId}', email_return_path_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#delete_email_return_path') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_sender(sender_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_sender API.
Deletes an approved sender for a tenancy in a given compartment for a provided senderId
.
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 |
# File 'lib/oci/email/email_client.rb', line 734 def delete_sender(sender_id, opts = {}) logger.debug 'Calling operation EmailClient#delete_sender.' if logger raise "Missing the required parameter 'sender_id' when calling delete_sender." if sender_id.nil? raise "Parameter value for 'sender_id' must not be blank" if OCI::Internal::Util.blank_string?(sender_id) path = '/senders/{senderId}'.sub('{senderId}', sender_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#delete_sender') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_suppression(suppression_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_suppression API.
Removes a suppressed recipient email address from the suppression list for a tenancy in a given compartment for a provided suppressionId
.
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 |
# File 'lib/oci/email/email_client.rb', line 790 def delete_suppression(suppression_id, opts = {}) logger.debug 'Calling operation EmailClient#delete_suppression.' if logger raise "Missing the required parameter 'suppression_id' when calling delete_suppression." if suppression_id.nil? raise "Parameter value for 'suppression_id' must not be blank" if OCI::Internal::Util.blank_string?(suppression_id) path = '/suppressions/{suppressionId}'.sub('{suppressionId}', suppression_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#delete_suppression') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#get_dkim(dkim_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_dkim API.
Retrieves the specified DKIM.
843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 |
# File 'lib/oci/email/email_client.rb', line 843 def get_dkim(dkim_id, opts = {}) logger.debug 'Calling operation EmailClient#get_dkim.' if logger raise "Missing the required parameter 'dkim_id' when calling get_dkim." if dkim_id.nil? raise "Parameter value for 'dkim_id' must not be blank" if OCI::Internal::Util.blank_string?(dkim_id) path = '/dkims/{dkimId}'.sub('{dkimId}', dkim_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#get_dkim') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::Dkim' ) end # rubocop:enable Metrics/BlockLength end |
#get_email_configuration(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_email_configuration API.
Returns email configuration associated with the specified compartment.
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 |
# File 'lib/oci/email/email_client.rb', line 898 def get_email_configuration(compartment_id, opts = {}) logger.debug 'Calling operation EmailClient#get_email_configuration.' if logger raise "Missing the required parameter 'compartment_id' when calling get_email_configuration." if compartment_id.nil? path = '/configuration' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#get_email_configuration') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::Configuration' ) end # rubocop:enable Metrics/BlockLength end |
#get_email_domain(email_domain_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_email_domain API.
Retrieves the specified email domain.
952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 |
# File 'lib/oci/email/email_client.rb', line 952 def get_email_domain(email_domain_id, opts = {}) logger.debug 'Calling operation EmailClient#get_email_domain.' if logger raise "Missing the required parameter 'email_domain_id' when calling get_email_domain." if email_domain_id.nil? raise "Parameter value for 'email_domain_id' must not be blank" if OCI::Internal::Util.blank_string?(email_domain_id) path = '/emailDomains/{emailDomainId}'.sub('{emailDomainId}', email_domain_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#get_email_domain') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::EmailDomain' ) end # rubocop:enable Metrics/BlockLength end |
#get_email_return_path(email_return_path_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_email_return_path API.
Retrieves the specified email return path.
1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 |
# File 'lib/oci/email/email_client.rb', line 1006 def get_email_return_path(email_return_path_id, opts = {}) logger.debug 'Calling operation EmailClient#get_email_return_path.' if logger raise "Missing the required parameter 'email_return_path_id' when calling get_email_return_path." if email_return_path_id.nil? raise "Parameter value for 'email_return_path_id' must not be blank" if OCI::Internal::Util.blank_string?(email_return_path_id) path = '/emailReturnPaths/{emailReturnPathId}'.sub('{emailReturnPathId}', email_return_path_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#get_email_return_path') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::EmailReturnPath' ) end # rubocop:enable Metrics/BlockLength end |
#get_sender(sender_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_sender API.
Gets an approved sender for a given senderId
.
1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 |
# File 'lib/oci/email/email_client.rb', line 1060 def get_sender(sender_id, opts = {}) logger.debug 'Calling operation EmailClient#get_sender.' if logger raise "Missing the required parameter 'sender_id' when calling get_sender." if sender_id.nil? raise "Parameter value for 'sender_id' must not be blank" if OCI::Internal::Util.blank_string?(sender_id) path = '/senders/{senderId}'.sub('{senderId}', sender_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#get_sender') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::Sender' ) end # rubocop:enable Metrics/BlockLength end |
#get_suppression(suppression_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_suppression API.
Gets the details of a suppressed recipient email address for a given suppressionId
. Each suppression is given a unique OCID.
1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 |
# File 'lib/oci/email/email_client.rb', line 1116 def get_suppression(suppression_id, opts = {}) logger.debug 'Calling operation EmailClient#get_suppression.' if logger raise "Missing the required parameter 'suppression_id' when calling get_suppression." if suppression_id.nil? raise "Parameter value for 'suppression_id' must not be blank" if OCI::Internal::Util.blank_string?(suppression_id) path = '/suppressions/{suppressionId}'.sub('{suppressionId}', suppression_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#get_suppression') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::Suppression' ) end # rubocop:enable Metrics/BlockLength end |
#get_work_request(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_work_request API.
Gets the status of the work request with the given ID.
1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 |
# File 'lib/oci/email/email_client.rb', line 1170 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation EmailClient#get_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#get_work_request') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#list_dkims(email_domain_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_dkims API.
Lists DKIMs for an email domain.
1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 |
# File 'lib/oci/email/email_client.rb', line 1250 def list_dkims(email_domain_id, opts = {}) logger.debug 'Calling operation EmailClient#list_dkims.' if logger raise "Missing the required parameter 'email_domain_id' when calling list_dkims." if email_domain_id.nil? if opts[:sort_order] && !OCI::Email::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Email::Models::SORT_ORDER_ENUM.' end if opts[:lifecycle_state] && !OCI::Email::Models::Dkim::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Email::Models::Dkim::LIFECYCLE_STATE_ENUM.' end if opts[:sort_by] && !%w[TIMECREATED ID NAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, ID, NAME.' end path = '/dkims' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:emailDomainId] = email_domain_id query_params[:id] = opts[:id] if opts[:id] query_params[:name] = opts[:name] if opts[:name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#list_dkims') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::DkimCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_email_domains(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_email_domains API.
Lists email domains in the specified compartment.
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 |
# File 'lib/oci/email/email_client.rb', line 1348 def list_email_domains(compartment_id, opts = {}) logger.debug 'Calling operation EmailClient#list_email_domains.' if logger raise "Missing the required parameter 'compartment_id' when calling list_email_domains." if compartment_id.nil? if opts[:sort_order] && !OCI::Email::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Email::Models::SORT_ORDER_ENUM.' end if opts[:lifecycle_state] && !OCI::Email::Models::EmailDomain::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Email::Models::EmailDomain::LIFECYCLE_STATE_ENUM.' end if opts[:sort_by] && !%w[TIMECREATED ID NAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, ID, NAME.' end path = '/emailDomains' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:id] = opts[:id] if opts[:id] query_params[:name] = opts[:name] if opts[:name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#list_email_domains') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::EmailDomainCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_email_return_paths(opts = {}) ⇒ Response
Click here to see an example of how to use list_email_return_paths API.
Lists email return paths in the specified compartment or emaildomain.
1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 |
# File 'lib/oci/email/email_client.rb', line 1448 def list_email_return_paths(opts = {}) logger.debug 'Calling operation EmailClient#list_email_return_paths.' if logger if opts[:sort_order] && !OCI::Email::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Email::Models::SORT_ORDER_ENUM.' end if opts[:lifecycle_state] && !OCI::Email::Models::EmailReturnPath::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Email::Models::EmailReturnPath::LIFECYCLE_STATE_ENUM.' end if opts[:sort_by] && !%w[TIMECREATED ID NAME].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, ID, NAME.' end path = '/emailReturnPaths' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:parentResourceId] = opts[:parent_resource_id] if opts[:parent_resource_id] query_params[:id] = opts[:id] if opts[:id] query_params[:name] = opts[:name] if opts[:name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#list_email_return_paths') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::EmailReturnPathCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_senders(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_senders API.
Gets a collection of approved sender email addresses and sender IDs.
1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 |
# File 'lib/oci/email/email_client.rb', line 1541 def list_senders(compartment_id, opts = {}) logger.debug 'Calling operation EmailClient#list_senders.' if logger raise "Missing the required parameter 'compartment_id' when calling list_senders." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::Email::Models::Sender::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Email::Models::Sender::LIFECYCLE_STATE_ENUM.' end if opts[:sort_by] && !%w[TIMECREATED EMAILADDRESS].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, EMAILADDRESS.' end if opts[:sort_order] && !OCI::Email::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Email::Models::SORT_ORDER_ENUM.' end path = '/senders' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:domain] = opts[:domain] if opts[:domain] query_params[:emailAddress] = opts[:email_address] if opts[:email_address] query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#list_senders') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::Email::Models::SenderSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_suppressions(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_suppressions API.
Gets a list of suppressed recipient email addresses for a user. The compartmentId
for suppressions must be a tenancy OCID. The returned list is sorted by creation time in descending order.
1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 |
# File 'lib/oci/email/email_client.rb', line 1652 def list_suppressions(compartment_id, opts = {}) logger.debug 'Calling operation EmailClient#list_suppressions.' if logger raise "Missing the required parameter 'compartment_id' when calling list_suppressions." if compartment_id.nil? if opts[:sort_by] && !%w[TIMECREATED EMAILADDRESS].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of TIMECREATED, EMAILADDRESS.' end if opts[:sort_order] && !OCI::Email::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::Email::Models::SORT_ORDER_ENUM.' end path = '/suppressions' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:emailAddress] = opts[:email_address] if opts[:email_address] query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to] query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than] query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#list_suppressions') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::Email::Models::SuppressionSummary>' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_request_errors API.
Return a (paginated) list of errors for a given work request.
1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 |
# File 'lib/oci/email/email_client.rb', line 1730 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation EmailClient#list_work_request_errors.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#list_work_request_errors') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::WorkRequestErrorCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_request_logs API.
Return a (paginated) list of logs for a given work request.
1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 |
# File 'lib/oci/email/email_client.rb', line 1795 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation EmailClient#list_work_request_logs.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#list_work_request_logs') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::WorkRequestLogEntryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_requests(compartment_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_requests API.
Lists the work requests in a compartment.
1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 |
# File 'lib/oci/email/email_client.rb', line 1861 def list_work_requests(compartment_id, opts = {}) logger.debug 'Calling operation EmailClient#list_work_requests.' if logger raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil? path = '/workRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id] query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#list_work_requests') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::WorkRequestSummaryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
98 99 100 |
# File 'lib/oci/email/email_client.rb', line 98 def logger @api_client.config.logger end |
#update_dkim(dkim_id, update_dkim_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_dkim API.
Modifies a DKIM.
1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 |
# File 'lib/oci/email/email_client.rb', line 1923 def update_dkim(dkim_id, update_dkim_details, opts = {}) logger.debug 'Calling operation EmailClient#update_dkim.' if logger raise "Missing the required parameter 'dkim_id' when calling update_dkim." if dkim_id.nil? raise "Missing the required parameter 'update_dkim_details' when calling update_dkim." if update_dkim_details.nil? raise "Parameter value for 'dkim_id' must not be blank" if OCI::Internal::Util.blank_string?(dkim_id) path = '/dkims/{dkimId}'.sub('{dkimId}', dkim_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_dkim_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#update_dkim') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_email_domain(email_domain_id, update_email_domain_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_email_domain API.
Modifies an email domain.
1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 |
# File 'lib/oci/email/email_client.rb', line 1983 def update_email_domain(email_domain_id, update_email_domain_details, opts = {}) logger.debug 'Calling operation EmailClient#update_email_domain.' if logger raise "Missing the required parameter 'email_domain_id' when calling update_email_domain." if email_domain_id.nil? raise "Missing the required parameter 'update_email_domain_details' when calling update_email_domain." if update_email_domain_details.nil? raise "Parameter value for 'email_domain_id' must not be blank" if OCI::Internal::Util.blank_string?(email_domain_id) path = '/emailDomains/{emailDomainId}'.sub('{emailDomainId}', email_domain_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_email_domain_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#update_email_domain') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_email_return_path(email_return_path_id, update_email_return_path_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_email_return_path API.
Modifies an email return path.
2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 |
# File 'lib/oci/email/email_client.rb', line 2043 def update_email_return_path(email_return_path_id, update_email_return_path_details, opts = {}) logger.debug 'Calling operation EmailClient#update_email_return_path.' if logger raise "Missing the required parameter 'email_return_path_id' when calling update_email_return_path." if email_return_path_id.nil? raise "Missing the required parameter 'update_email_return_path_details' when calling update_email_return_path." if update_email_return_path_details.nil? raise "Parameter value for 'email_return_path_id' must not be blank" if OCI::Internal::Util.blank_string?(email_return_path_id) path = '/emailReturnPaths/{emailReturnPathId}'.sub('{emailReturnPathId}', email_return_path_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_email_return_path_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#update_email_return_path') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_sender(sender_id, update_sender_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_sender API.
Replaces the set of tags for a sender with the tags provided. If either freeform or defined tags are omitted, the tags for that set remain the same. Each set must include the full set of tags for the sender, partial updates are not permitted. For more information about tagging, see Resource Tags.
2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 |
# File 'lib/oci/email/email_client.rb', line 2107 def update_sender(sender_id, update_sender_details, opts = {}) logger.debug 'Calling operation EmailClient#update_sender.' if logger raise "Missing the required parameter 'sender_id' when calling update_sender." if sender_id.nil? raise "Missing the required parameter 'update_sender_details' when calling update_sender." if update_sender_details.nil? raise "Parameter value for 'sender_id' must not be blank" if OCI::Internal::Util.blank_string?(sender_id) path = '/senders/{senderId}'.sub('{senderId}', sender_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_sender_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'EmailClient#update_sender') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::Email::Models::Sender' ) end # rubocop:enable Metrics/BlockLength end |