Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EmailClient

This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.

Hierarchy

  • EmailClient

Constructors

constructor

  • new EmailClient(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration): EmailClient

Properties

Protected _bodyDuplexMode

_bodyDuplexMode: any = undefined

Protected _circuitBreaker

_circuitBreaker: typeof Breaker | null = null

Protected _clientConfiguration

_clientConfiguration: ClientConfiguration

Protected _defaultHeaders

_defaultHeaders: any

Protected _endpoint

_endpoint: string = ""

Protected _httpClient

_httpClient: HttpClient

Protected _httpOptions

_httpOptions: any = undefined

Protected _lastSetRegionOrRegionId

_lastSetRegionOrRegionId: string = ""

Protected _realmSpecificEndpointTemplateEnabled

_realmSpecificEndpointTemplateEnabled: boolean | undefined = undefined

Protected _region

_region: Region

Protected _regionId

_regionId: string = ""

Protected _waiters

_waiters: EmailWaiter

targetService

targetService: string = "Email"

Static Protected endpointServiceName

endpointServiceName: string = ""

Static Protected serviceEndpointTemplate

serviceEndpointTemplate: string = "https://ctrl.email.{region}.oci.{secondLevelDomain}"

Accessors

endpoint

  • get endpoint(): string
  • set endpoint(endpoint: string): void

logger

region

  • set region(region: Region): void
  • Sets the region to call (ex, Region.US_PHOENIX_1). Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.

    Parameters

    • region: Region

      The region of the service.

    Returns void

regionId

  • set regionId(regionId: string): void
  • Sets the regionId to call (ex, 'us-phoenix-1').

    Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}. If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1 and then call {@link #endpoint(String) endpoint}.

    Parameters

    • regionId: string

      The public region ID.

    Returns void

useRealmSpecificEndpointTemplate

  • set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled: boolean): void
  • Determines whether realm specific endpoint should be used or not. Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"

    Parameters

    • realmSpecificEndpointTemplateEnabled: boolean

      flag to enable the use of realm specific endpoint template

    Returns void

Methods

changeEmailDomainCompartment

  • 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ChangeEmailDomainCompartment API.

    Parameters

    Returns Promise<ChangeEmailDomainCompartmentResponse>

    ChangeEmailDomainCompartmentResponse

changeSenderCompartment

  • Moves a sender into a different compartment. When provided, If-Match is checked against ETag values of the resource. This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ChangeSenderCompartment API.

    Parameters

    Returns Promise<ChangeSenderCompartmentResponse>

    ChangeSenderCompartmentResponse

close

  • close(): void

createDkim

  • 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateDkim API.

    Parameters

    Returns Promise<CreateDkimResponse>

    CreateDkimResponse

createEmailDomain

  • Creates a new email domain. Avoid entering confidential information. This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateEmailDomain API.

    Parameters

    Returns Promise<CreateEmailDomainResponse>

    CreateEmailDomainResponse

createSender

  • Creates a sender for a tenancy in a given compartment. This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateSender API.

    Parameters

    Returns Promise<CreateSenderResponse>

    CreateSenderResponse

createSuppression

  • 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use CreateSuppression API.

    Parameters

    Returns Promise<CreateSuppressionResponse>

    CreateSuppressionResponse

createWaiters

  • createWaiters(config?: common.WaiterConfiguration): EmailWaiter
  • Creates a new EmailWaiter for resources for this service.

    Parameters

    • Optional config: common.WaiterConfiguration

      The waiter configuration for termination and delay strategy

    Returns EmailWaiter

    The service waiters.

deleteDkim

  • 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DeleteDkim API.

    Parameters

    Returns Promise<DeleteDkimResponse>

    DeleteDkimResponse

deleteEmailDomain

deleteSender

  • Deletes an approved sender for a tenancy in a given compartment for a provided senderId.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DeleteSender API.

    Parameters

    Returns Promise<DeleteSenderResponse>

    DeleteSenderResponse

deleteSuppression

  • Removes a suppressed recipient email address from the suppression list for a tenancy in a given compartment for a provided suppressionId.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use DeleteSuppression API.

    Parameters

    Returns Promise<DeleteSuppressionResponse>

    DeleteSuppressionResponse

getDkim

  • Retrieves the specified DKIM. This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetDkim API.

    Parameters

    Returns Promise<GetDkimResponse>

    GetDkimResponse

getEmailConfiguration

getEmailDomain

getSender

  • Gets an approved sender for a given senderId. This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetSender API.

    Parameters

    Returns Promise<GetSenderResponse>

    GetSenderResponse

getSuppression

  • Gets the details of a suppressed recipient email address for a given suppressionId. Each suppression is given a unique OCID.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetSuppression API.

    Parameters

    Returns Promise<GetSuppressionResponse>

    GetSuppressionResponse

getWaiters

getWorkRequest

  • Gets the status of the work request with the given ID. This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use GetWorkRequest API.

    Parameters

    Returns Promise<GetWorkRequestResponse>

    GetWorkRequestResponse

listAllSenders

  • NOTE: This function is deprecated in favor of listSendersRecordIterator function. Creates a new async iterator which will iterate over the models.SenderSummary objects contained in responses from the listSenders operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<SenderSummary>

listAllSendersResponses

  • NOTE: This function is deprecated in favor of listSendersResponseIterator function. Creates a new async iterator which will iterate over the responses received from the listSenders operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<ListSendersResponse>

listAllSuppressions

  • NOTE: This function is deprecated in favor of listSuppressionsRecordIterator function. Creates a new async iterator which will iterate over the models.SuppressionSummary objects contained in responses from the listSuppressions operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<SuppressionSummary>

listAllSuppressionsResponses

  • NOTE: This function is deprecated in favor of listSuppressionsResponseIterator function. Creates a new async iterator which will iterate over the responses received from the listSuppressions operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<ListSuppressionsResponse>

listDkims

  • Lists DKIMs for an email domain. This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListDkims API.

    Parameters

    Returns Promise<ListDkimsResponse>

    ListDkimsResponse

listEmailDomains

  • Lists email domains in the specified compartment. This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListEmailDomains API.

    Parameters

    Returns Promise<ListEmailDomainsResponse>

    ListEmailDomainsResponse

listSenders

  • Gets a collection of approved sender email addresses and sender IDs.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListSenders API.

    Parameters

    Returns Promise<ListSendersResponse>

    ListSendersResponse

listSendersRecordIterator

  • Creates a new async iterator which will iterate over the models.SenderSummary objects contained in responses from the listSenders operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<SenderSummary>

listSendersResponseIterator

  • Creates a new async iterator which will iterate over the responses received from the listSenders operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<ListSendersResponse>

listSuppressions

  • 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ListSuppressions API.

    Parameters

    Returns Promise<ListSuppressionsResponse>

    ListSuppressionsResponse

listSuppressionsRecordIterator

  • Creates a new async iterator which will iterate over the models.SuppressionSummary objects contained in responses from the listSuppressions operation. This iterator will fetch more data from the server as needed.

    Parameters

    Returns AsyncIterableIterator<SuppressionSummary>

listSuppressionsResponseIterator

listWorkRequestErrors

listWorkRequestLogs

listWorkRequests

shutdownCircuitBreaker

  • shutdownCircuitBreaker(): void

updateDkim

updateEmailDomain

updateSender

  • 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.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use UpdateSender API.

    Parameters

    Returns Promise<UpdateSenderResponse>

    UpdateSenderResponse