Class: OCI::Email::EmailClient
- Inherits:
-
Object
- Object
- OCI::Email::EmailClient
- Defined in:
- lib/oci/email/email_client.rb
Overview
API for the Email Delivery service. Use this API to send high-volume, application-generated emails. 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 a 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 a email domain.
-
#create_email_domain(create_email_domain_details, opts = {}) ⇒ Response
Creates a new email domain.
-
#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 a email domain.
-
#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_domain(email_domain_id, opts = {}) ⇒ Response
Retrieves the specified email domain.
-
#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 a email domain.
-
#list_email_domains(compartment_id, opts = {}) ⇒ Response
Lists email domains in the specified compartment.
-
#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 a email domain.
-
#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.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/oci/email/email_client.rb', line 60 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.
20 21 22 |
# File 'lib/oci/email/email_client.rb', line 20 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
24 25 26 |
# File 'lib/oci/email/email_client.rb', line 24 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
34 35 36 |
# File 'lib/oci/email/email_client.rb', line 34 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
30 31 32 |
# File 'lib/oci/email/email_client.rb', line 30 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 a 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.
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 172 |
# File 'lib/oci/email/email_client.rb', line 133 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.
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 232 |
# File 'lib/oci/email/email_client.rb', line 195 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 a email domain. This DKIM will sign 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 will seamlessly pick up the new key without interruption in signing.
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 298 |
# File 'lib/oci/email/email_client.rb', line 261 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.
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 359 |
# File 'lib/oci/email/email_client.rb', line 322 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_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.
377 378 379 380 381 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 |
# File 'lib/oci/email/email_client.rb', line 377 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.
435 436 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 |
# File 'lib/oci/email/email_client.rb', line 435 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 instead of deletion creating a new DKIM for this domain so the signing can be rotated to it.
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 531 532 533 534 |
# File 'lib/oci/email/email_client.rb', line 498 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 a email domain.
556 557 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 |
# File 'lib/oci/email/email_client.rb', line 556 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_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
.
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_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
.
672 673 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 |
# File 'lib/oci/email/email_client.rb', line 672 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.
725 726 727 728 729 730 731 732 733 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 |
# File 'lib/oci/email/email_client.rb', line 725 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_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.
779 780 781 782 783 784 785 786 787 788 789 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 |
# File 'lib/oci/email/email_client.rb', line 779 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_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
.
833 834 835 836 837 838 839 840 841 842 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 |
# File 'lib/oci/email/email_client.rb', line 833 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.
889 890 891 892 893 894 895 896 897 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 |
# File 'lib/oci/email/email_client.rb', line 889 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.
943 944 945 946 947 948 949 950 951 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 |
# File 'lib/oci/email/email_client.rb', line 943 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 a email domain.
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 |
# File 'lib/oci/email/email_client.rb', line 1023 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.
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 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 |
# File 'lib/oci/email/email_client.rb', line 1121 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_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.
1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 |
# File 'lib/oci/email/email_client.rb', line 1214 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.
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 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 |
# File 'lib/oci/email/email_client.rb', line 1325 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.
1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 |
# File 'lib/oci/email/email_client.rb', line 1403 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.
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 1504 1505 1506 |
# File 'lib/oci/email/email_client.rb', line 1468 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.
1534 1535 1536 1537 1538 1539 1540 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 |
# File 'lib/oci/email/email_client.rb', line 1534 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.
99 100 101 |
# File 'lib/oci/email/email_client.rb', line 99 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.
1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 |
# File 'lib/oci/email/email_client.rb', line 1596 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 a email domain.
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 |
# File 'lib/oci/email/email_client.rb', line 1656 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_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.
1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 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 |
# File 'lib/oci/email/email_client.rb', line 1720 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 |