1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Email
  5. getSuppressions
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Email.getSuppressions

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Suppressions in Oracle Cloud Infrastructure Email service.

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.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testSuppressions = oci.Email.getSuppressions({
    compartmentId: tenancyOcid,
    emailAddress: suppressionEmailAddress,
    timeCreatedGreaterThanOrEqualTo: suppressionTimeCreatedGreaterThanOrEqualTo,
    timeCreatedLessThan: suppressionTimeCreatedLessThan,
});
Copy
import pulumi
import pulumi_oci as oci

test_suppressions = oci.Email.get_suppressions(compartment_id=tenancy_ocid,
    email_address=suppression_email_address,
    time_created_greater_than_or_equal_to=suppression_time_created_greater_than_or_equal_to,
    time_created_less_than=suppression_time_created_less_than)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/email"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := email.GetSuppressions(ctx, &email.GetSuppressionsArgs{
			CompartmentId:                   tenancyOcid,
			EmailAddress:                    pulumi.StringRef(suppressionEmailAddress),
			TimeCreatedGreaterThanOrEqualTo: pulumi.StringRef(suppressionTimeCreatedGreaterThanOrEqualTo),
			TimeCreatedLessThan:             pulumi.StringRef(suppressionTimeCreatedLessThan),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testSuppressions = Oci.Email.GetSuppressions.Invoke(new()
    {
        CompartmentId = tenancyOcid,
        EmailAddress = suppressionEmailAddress,
        TimeCreatedGreaterThanOrEqualTo = suppressionTimeCreatedGreaterThanOrEqualTo,
        TimeCreatedLessThan = suppressionTimeCreatedLessThan,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Email.EmailFunctions;
import com.pulumi.oci.Email.inputs.GetSuppressionsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testSuppressions = EmailFunctions.getSuppressions(GetSuppressionsArgs.builder()
            .compartmentId(tenancyOcid)
            .emailAddress(suppressionEmailAddress)
            .timeCreatedGreaterThanOrEqualTo(suppressionTimeCreatedGreaterThanOrEqualTo)
            .timeCreatedLessThan(suppressionTimeCreatedLessThan)
            .build());

    }
}
Copy
variables:
  testSuppressions:
    fn::invoke:
      function: oci:Email:getSuppressions
      arguments:
        compartmentId: ${tenancyOcid}
        emailAddress: ${suppressionEmailAddress}
        timeCreatedGreaterThanOrEqualTo: ${suppressionTimeCreatedGreaterThanOrEqualTo}
        timeCreatedLessThan: ${suppressionTimeCreatedLessThan}
Copy

Using getSuppressions

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSuppressions(args: GetSuppressionsArgs, opts?: InvokeOptions): Promise<GetSuppressionsResult>
function getSuppressionsOutput(args: GetSuppressionsOutputArgs, opts?: InvokeOptions): Output<GetSuppressionsResult>
Copy
def get_suppressions(compartment_id: Optional[str] = None,
                     email_address: Optional[str] = None,
                     filters: Optional[Sequence[_email.GetSuppressionsFilter]] = None,
                     time_created_greater_than_or_equal_to: Optional[str] = None,
                     time_created_less_than: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetSuppressionsResult
def get_suppressions_output(compartment_id: Optional[pulumi.Input[str]] = None,
                     email_address: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_email.GetSuppressionsFilterArgs]]]] = None,
                     time_created_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                     time_created_less_than: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetSuppressionsResult]
Copy
func GetSuppressions(ctx *Context, args *GetSuppressionsArgs, opts ...InvokeOption) (*GetSuppressionsResult, error)
func GetSuppressionsOutput(ctx *Context, args *GetSuppressionsOutputArgs, opts ...InvokeOption) GetSuppressionsResultOutput
Copy

> Note: This function is named GetSuppressions in the Go SDK.

public static class GetSuppressions 
{
    public static Task<GetSuppressionsResult> InvokeAsync(GetSuppressionsArgs args, InvokeOptions? opts = null)
    public static Output<GetSuppressionsResult> Invoke(GetSuppressionsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSuppressionsResult> getSuppressions(GetSuppressionsArgs args, InvokeOptions options)
public static Output<GetSuppressionsResult> getSuppressions(GetSuppressionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Email/getSuppressions:getSuppressions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The OCID for the compartment.
EmailAddress string
The email address of the suppression.
Filters Changes to this property will trigger replacement. List<GetSuppressionsFilter>
TimeCreatedGreaterThanOrEqualTo string

Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

TimeCreatedLessThan string

Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

CompartmentId This property is required. string
The OCID for the compartment.
EmailAddress string
The email address of the suppression.
Filters Changes to this property will trigger replacement. []GetSuppressionsFilter
TimeCreatedGreaterThanOrEqualTo string

Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

TimeCreatedLessThan string

Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

compartmentId This property is required. String
The OCID for the compartment.
emailAddress String
The email address of the suppression.
filters Changes to this property will trigger replacement. List<GetSuppressionsFilter>
timeCreatedGreaterThanOrEqualTo String

Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

timeCreatedLessThan String

Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

compartmentId This property is required. string
The OCID for the compartment.
emailAddress string
The email address of the suppression.
filters Changes to this property will trigger replacement. GetSuppressionsFilter[]
timeCreatedGreaterThanOrEqualTo string

Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

timeCreatedLessThan string

Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

compartment_id This property is required. str
The OCID for the compartment.
email_address str
The email address of the suppression.
filters Changes to this property will trigger replacement. Sequence[email.GetSuppressionsFilter]
time_created_greater_than_or_equal_to str

Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

time_created_less_than str

Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

compartmentId This property is required. String
The OCID for the compartment.
emailAddress String
The email address of the suppression.
filters Changes to this property will trigger replacement. List<Property Map>
timeCreatedGreaterThanOrEqualTo String

Search for suppressions that were created within a specific date range, using this parameter to specify the earliest creation date for the returned list (inclusive). Specifying this parameter without the corresponding timeCreatedLessThan parameter will retrieve suppressions created from the given timeCreatedGreaterThanOrEqualTo to the current time, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

timeCreatedLessThan String

Search for suppressions that were created within a specific date range, using this parameter to specify the latest creation date for the returned list (exclusive). Specifying this parameter without the corresponding timeCreatedGreaterThanOrEqualTo parameter will retrieve all suppressions created before the specified end date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Example: 2016-12-19T16:39:57.600Z

getSuppressions Result

The following output properties are available:

CompartmentId string
The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
Id string
The provider-assigned unique ID for this managed resource.
Suppressions List<GetSuppressionsSuppression>
The list of suppressions.
EmailAddress string
The email address of the suppression.
Filters List<GetSuppressionsFilter>
TimeCreatedGreaterThanOrEqualTo string
TimeCreatedLessThan string
CompartmentId string
The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
Id string
The provider-assigned unique ID for this managed resource.
Suppressions []GetSuppressionsSuppression
The list of suppressions.
EmailAddress string
The email address of the suppression.
Filters []GetSuppressionsFilter
TimeCreatedGreaterThanOrEqualTo string
TimeCreatedLessThan string
compartmentId String
The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
id String
The provider-assigned unique ID for this managed resource.
suppressions List<GetSuppressionsSuppression>
The list of suppressions.
emailAddress String
The email address of the suppression.
filters List<GetSuppressionsFilter>
timeCreatedGreaterThanOrEqualTo String
timeCreatedLessThan String
compartmentId string
The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
id string
The provider-assigned unique ID for this managed resource.
suppressions GetSuppressionsSuppression[]
The list of suppressions.
emailAddress string
The email address of the suppression.
filters GetSuppressionsFilter[]
timeCreatedGreaterThanOrEqualTo string
timeCreatedLessThan string
compartment_id str
The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
id str
The provider-assigned unique ID for this managed resource.
suppressions Sequence[email.GetSuppressionsSuppression]
The list of suppressions.
email_address str
The email address of the suppression.
filters Sequence[email.GetSuppressionsFilter]
time_created_greater_than_or_equal_to str
time_created_less_than str
compartmentId String
The OCID of the compartment to contain the suppression. Since suppressions are at the customer level, this must be the tenancy OCID.
id String
The provider-assigned unique ID for this managed resource.
suppressions List<Property Map>
The list of suppressions.
emailAddress String
The email address of the suppression.
filters List<Property Map>
timeCreatedGreaterThanOrEqualTo String
timeCreatedLessThan String

Supporting Types

GetSuppressionsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetSuppressionsSuppression

CompartmentId This property is required. string
The OCID for the compartment.
EmailAddress This property is required. string
The email address of the suppression.
ErrorDetail This property is required. string
The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
ErrorSource This property is required. string
DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
Id This property is required. string
The unique OCID of the suppression.
MessageId This property is required. string
The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
Reason This property is required. string
The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
TimeCreated This property is required. string
The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
TimeLastSuppressed This property is required. string
The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
CompartmentId This property is required. string
The OCID for the compartment.
EmailAddress This property is required. string
The email address of the suppression.
ErrorDetail This property is required. string
The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
ErrorSource This property is required. string
DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
Id This property is required. string
The unique OCID of the suppression.
MessageId This property is required. string
The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
Reason This property is required. string
The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
TimeCreated This property is required. string
The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
TimeLastSuppressed This property is required. string
The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
compartmentId This property is required. String
The OCID for the compartment.
emailAddress This property is required. String
The email address of the suppression.
errorDetail This property is required. String
The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
errorSource This property is required. String
DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
id This property is required. String
The unique OCID of the suppression.
messageId This property is required. String
The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
reason This property is required. String
The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
timeCreated This property is required. String
The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
timeLastSuppressed This property is required. String
The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
compartmentId This property is required. string
The OCID for the compartment.
emailAddress This property is required. string
The email address of the suppression.
errorDetail This property is required. string
The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
errorSource This property is required. string
DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
id This property is required. string
The unique OCID of the suppression.
messageId This property is required. string
The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
reason This property is required. string
The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
timeCreated This property is required. string
The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
timeLastSuppressed This property is required. string
The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
compartment_id This property is required. str
The OCID for the compartment.
email_address This property is required. str
The email address of the suppression.
error_detail This property is required. str
The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
error_source This property is required. str
DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
id This property is required. str
The unique OCID of the suppression.
message_id This property is required. str
The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
reason This property is required. str
The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
time_created This property is required. str
The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
time_last_suppressed This property is required. str
The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
compartmentId This property is required. String
The OCID for the compartment.
emailAddress This property is required. String
The email address of the suppression.
errorDetail This property is required. String
The specific error message returned by a system that resulted in the suppression. This message is usually an SMTP error code with additional descriptive text. Not provided for all types of suppressions.
errorSource This property is required. String
DNS name of the source of the error that caused the suppression. Will be set to either the remote-mta or reporting-mta field from a delivery status notification (RFC 3464) when available. Not provided for all types of suppressions, and not always known.
id This property is required. String
The unique OCID of the suppression.
messageId This property is required. String
The value of the Message-ID header from the email that triggered a suppression. This value is as defined in RFC 5322 section 3.6.4, excluding angle-brackets. Not provided for all types of suppressions.
reason This property is required. String
The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List.
timeCreated This property is required. String
The date and time a recipient's email address was added to the suppression list, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.
timeLastSuppressed This property is required. String
The last date and time the suppression prevented submission in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by RFC 3339.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi